Hi,
I'm Working on SAP IoT services and trying to consuming in SAPUI5.
I have used the below code to post data using IoT plugin.
var oAuth = "Bearer oAuthCode"; var message = [{ "location":""+lat+" N,"+lon+" E" }]; var sDeviceId = "00000000-0000-000f00000-94f094f03100"; var sMessageTypeId = "00000000000000000000"; var seconds = new Date().getTime(); IOT.postData(sDeviceId,"sync",sMessageTypeId,message, function(result){ sap.m.MessageToast.show("Message sent: "+result); }, function(error){ sap.m.MessageToast.show("Message Error : "+error.responseText); }, { headers: { "Authorization":oAuth }});
The status code is shown as 401 unauthorized.
Please help me on this.
Thanks and Regards,
Prabhu M.
Please, see similar thread [1] and the answer by Former Member who suggests to re-check destination settings.
Regards,
Anton
[1] https://answers.sap.com/questions/185527/unable-to-connect-iot-message-management-service-t.html
You already have an active moderator alert for this content.
Add comment