on 07-04-2017 11:29 AM
Hi,
I am creating a IOT application on HCP. I have 1 message type, 1 device type with OAuth token and 2 devices with OAuth token.
I am using POSTMAN to post HTTP request. I get the following error.
<!DOCTYPE html>
<html>
<head>
<title>SAP Cloud Platform IoT Service</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<style type="text/css"></style>
</head>
<body style="background-color: #ffffff;">
<p>Access to the requested resource is not authorized (HTTP 401).</p>
</body>
</html>
This is my config
Please share your inputs.
Hello Sandeep, by definition you may have only one single "Authorization" header [1] in your HTTP request. Make sure you use one supplied with oath token of your device (not device type token) and check that the HTTP POST url ends with the device ID. Also, be aware that Postman may re-use your browser session, so I suggest to close all browser windows where you have been authenticated with SAML against SAP Cloud Platform (Cockpit etc). Regards, Anton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have masked the values on screenshots but just based on their length, I have a feeling you used device id as Bearer and put oauth token to URL. This should be opposite: ../v1/api/http/data/device-id and Bearer oauth-token. Also, check the browser session sspect from my last comment. Regards, Anton
Thanks Anton. You are right. I closed all browsers,cleared cache and history, re-deployed the MMS and voila! it worked.
Thank you once again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.