How can I use Push message publishing from desktop to mobile. Off course without using Backendless Consol.
Currently I am using REST API.
You would need to use the following API:
Do you have any specific questions about it?
Thanks for a quick reply.
I am using REST API currently for both Desktop version and mobile version but for Desktop version when I publish message using method given in above mentioned link, I get error 5007 : User does not have permission to publish message.
Though I have given permission to the user.
I think, my desktop app first needs to subscribe to publish messages. In this case, my desktop app doesn’t get registered as device because it is not mobile device.
Off course, if I send messages from console I receive messages on my mobile devices properly.
Please let me know what mistake I could be making here.
You do not need to subscribe in order to publish. What I believe is missing in your case is the “user-token” header which should be sent along with the publish request to the server. When the header is present in the request, it identifies the user whose identity is used by the backend in order to enforce the assigned permissions. The value of the header is the same value you receive in the login response for it.
Hope this helps.
Thanks a lot. Using the user-token in the header worked.
But none of the examples or request body in the API Documents mention about using the user-token in the header.