Script token API access problem

MarcL23
MarcL23 Posts: 3
edited August 2021 in Deployment & Integrations

Hello,


I am trying to get session information out of the endpoint api/v1/EventLogging with a script token.

The script token was created as described here: www.teamviewer.com/de/fur-entwickler/?t=1610546063597#create-script-section

I gave it the maximum of permissions to try out the API.

I put the script token into the „Authorization“ HTTP Header as Bearer, is that correct?


A GET request to webapi.teamviewer.com/api/v1/Ping gives the response „token_valid: true“.


A POST request to webapi.teamviewer.com/api/v1/EventLogging with the following JSON body

{

    "startDate":"2019-01-01T14:00:00Z",

    "endDate":"2020-01-31T14:00:00Z",

    "Events": [

        "StartedSession",

        "EndedSession",

        "IncomingSession",

        "JoinedSession",

        "LeftSession"

    ],

    "EventTypes": [

        "Session"

    ]

 }


always gives as response:


{

   "error": "invalid_token",

   "error_description": "Access token does not have the required permissions for this function.",

   "error_code": 2

}


Any idea what might be the problem here?

Best Answer

  • MarcL23
    MarcL23 Posts: 3
    Answer ✓

    For anyone stumbling across this problem the API docs give an explanation: "A Tensor license is required."

    We were missing the license. Duh.

Answers

  • MarcL23
    MarcL23 Posts: 3
    Answer ✓

    For anyone stumbling across this problem the API docs give an explanation: "A Tensor license is required."

    We were missing the license. Duh.