cancel
Showing results for 
Search instead for 
Did you mean: 

IoT MMS Receiving messages is not working

Former Member
0 Kudos

Hi Colleagues,

Could you please help me in receiving messages for IoT MMS. I am using Chrome Postman and I am receiving a blank JSON. The IoT Device table has some sample value but it is not returned via GET .

Please suggest your input.

Thanks and Regards,

Albert Tigga

Accepted Solutions (1)

Accepted Solutions (1)

anton_levin
Advisor
Advisor
0 Kudos

Hi Albert,

it depends what you want to achieve.

With HTTP GET against ../com.sap.iotservices.mms/v1/api/http/data/<DEVICE_ID> (like on your screenshot) you get messages that were "pushed" TO the device. See [1] "Receiving Messages from MMS" section. Yo get an empty array since there are no messages pushed to the device.

If you want to get / see the messages that were sent FROM the device, you would better check [2] "Message Consumption". There you have several options like OData, Persistence Service etc.

Regards,

Anton

[1] SAP HANA Cloud Platform Internet of Things (IoT) Services

[2] SAP HANA Cloud Platform Internet of Things (IoT) Services

Former Member
0 Kudos

Hi Anton,

Thanks for your input it is working now.

Regards,

Albert

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

SergioG_TX
Active Contributor
0 Kudos

Albert,

please see this blog - I was able to do that from the HCP Trial account

Former Member
0 Kudos

Hi Sergio,

Thanks for your reply but I am looking for how do I e GET to receiving Messages from MMS

To receive messages that have been pushed to a specific device through the Push Service and have been cached by MMS, we can do HTTP GET request to: to get the data but I am getting

Error "Access to the requested resource is not authorized (HTTP 401)." in postman.

Please help to know what I am missing

Thanks and Regards,

Albert Tigga

anton_levin
Advisor
Advisor
0 Kudos

Hi Albert,

Data Services are protected with OAuth [1]. I'd guess that Postman reuses your browser session where you have been authenticated with SAML (by accessing HCP or MMS Cockpit) that is why you get 401 error code back. Try to close all browser windows and then fire GET request in Postman.

Regards,

Anton

[1] SAP HANA Cloud Platform Internet of Things (IoT) Services