Error accessing devices refresh access token(Create or refresh the access token of a device): Permission denied

“As application owner i’m trying to access the device refresh access token using a curl command inside a container using http://api.calponia.in , but I’m getting the following error message: {"error":{"status":403,"code":"PERMISSION_DENIED","title":"Permission to execute this request was denied","detail":"The authorized user does not have the permission to execute this request."}} . It should work, if I’m running other GET/POST APIs; they are working fine. Only this API is giving me this error.”

and why is it that when I try to use the -H flag and pass the token and URL using https://api.pantaris.io , it works, but within the calponia container using (http://api.calponia.in) , it doesn’t work? Based on my understanding, the access token should be automatically recognized for all APIs.

Curl command : curl -X POST PANTARIS | Marketplace{paasing correct device id}/refresh-accesstoken

Could you please clarify the reason. Thank you!!

Hey there,

Requests that are sent to api.calponia.in automatically get an application token attached, with MEMBER permissions only for the project that the application runs in. These MEMBER permissions do not include the project.CURRENT.devices.refresh-accesstoken permission required for this endpoint.

You can however request elevated permissions via the application manifest, but be aware that they will not be available in sandboxes.