FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
161 views 1 comments
by anonymous

I have created API access token with the following scopes:

  • device_credits:read
  • credits:read
  • credits:write
  • command:execute

 When I try a PUT request to /devices​/credit with

                          {
                          "data": [
                           {
                              "device_id": (device id 1123123),
                              "auto_extend_credit": false,
                              "credit_enabled": true
                            }
                          ]
                        }

I am getting a FORBIDDEN response:

{"success":false, "errors ":[{"code":"FORBIDDEN","message":"Forbidden."}]}"

Do I need to grant some additional scopes?

1 Answer

–1 vote
by anonymous

Hello,

You can find the full guide for RMS credit code creation here.

Also, please make sure, that you are properly authorized

by anonymous
The referred document deals with managing credits (transferring them, generating codes etc.), but not with applying already existing credit to a particular device, which is where I am facing the problem reported