cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with modifying the device authentication token IoT

Former Member
0 Kudos

Hello,

I have as a task to make a client that will change the access token of a device in the IoT service.

I use the URI model in documentation and changed the host and id. The problem is that when I make the DELETE or POST request it returns error code 404.

Is there a way to change the access token of a device?

Accepted Solutions (1)

Accepted Solutions (1)

anton_levin
Advisor
Advisor
0 Kudos

Hi Nikolay,

yes, it is possible. If you like to make it with RESTful API, you'd need to use RDMS V2. See more in documentation [1]


The token can also be renewed in a single step using a

POST on https://<host>/com.sap.iotservices.dms/v2/api/devices/<id>/authentication/token with empty body.

The response contains the updated authentication object.

{ "type": "oauth", "token": " u2jrvvqaathb3bl4dp6dfanw54dl0x" }

Regards,

Anton

[1] SAP HANA Cloud Platform Internet of Things Services

Former Member
0 Kudos

I read the documentation and used this URI model.

My URI is https://iotcockpitiotservices-i328326trial.hanatrial.ondemand.com/com.sap.iotservices.dms/v2/api/dev...

and returns again 404. I put as a header basic authorization.

anton_levin
Advisor
Advisor
0 Kudos

Your URL is wrong. You try to use RDMS API but refer to "iotcockpit" app. Should be "https://iotrdmsiotservices-i3..."

Former Member
0 Kudos

Thank you  very much!

Answers (0)