cancel
Showing results for 
Search instead for 
Did you mean: 

MMS Cockpit Error - Access to the requested resource is not authorized (HTTP 401)

Former Member
0 Kudos

Hi All,

I have tried to set up HCP IoT. But I'm getting error in receiving messages.

To receive messages that have been pushed to a specific device through the Push Service.This message is cached in MMS. I'm trying to do GET request. But it is throwing error - "Access to the requested resource is not authorized (HTTP 401)".

Please help me in solving the issue.

Regards,

Sushil Rajakumar

Accepted Solutions (1)

Accepted Solutions (1)

anton_levin
Advisor
Advisor
0 Kudos

Hello Sushil,

how do you send your HTTP request / with what tool? Make sure to provide an Authorization HTTP header with your request.

Regards,

Anton

Former Member
0 Kudos

Hi Anton,

Thanks for your reply.

I'm using Postman in chrome. But what am I supposed to give in the header authorization ? I mean to say in Username and password ? Is it the HCP trial id and password?

Regards,

Sushil

wizzhi
Employee
Employee
0 Kudos

for example"Authorization: Bearer xxx\n" the xxx is the token can be generated in your cockpit.

anton_levin
Advisor
Advisor
0 Kudos

If we speak about getting the messages pushed TO the device here then this is the Data Services API which is protected with OAuth [1]

In postman you have an option to supply your requests with HTTP headers (see below)

Be aware that Postman may re-use your current browser session (where you are authenticated with SAML), so I suggest to close all browser windows and re-launch postman before doing the tests.

Regards,

Anton

[1] SAP HANA Cloud Platform Internet of Things Services

anton_levin
Advisor
Advisor
0 Kudos

Hello Sushil,

please let me know if your issue is fixed.

Regards,

Anton

Also, according to close the current thread -> Be responsive. If an SCN member has answered your question, please mark the answer as "helpful” or “correct”. Mark the discussion as “answered,” so that other members can find the answers more easily.

Former Member
0 Kudos

Hi Anton,

Ya thank you so much. For receiving messages, it works fine in Postman after giving authorization and content type under header tab.

Regards,

Sushil

Answers (0)