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
181 views 0 comments
by anonymous

I have created API access token with the following ALL scopes:

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

                          {

                          "data": [

                           {

                              "device_id": XXX,

                              "auto_extend_credit": false,

                              "credit_enabled": true

                            }

                          ]

                        }

For example with CURL:

curl -H "Authorization: Bearer BBB" -X PUT "https://rms.teltonika-networks.com/api/devices/credi" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{ \"data\": [ { \"device_id\": XXX, \"auto_extend_credit\": false, \"credit_enabled\": true } ] }

I am getting a FORBIDDEN response:

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

Why doesn't this work? All scopes are enabled for the token. I also read https://wiki.teltonika-networks.com/view/RMS_API_Credits, but it doesn't provide any information about applying credit to given device.

1 Answer

0 votes
by anonymous
Hi,

Thanks for contacting Teltonika community support forum. Please find our response below:

Thank you for bringing it up to us. This issue has been reported to RnD and will be fixed next patch push, which probably happens next week.

Regards,

Ramandeep