Denys Kazakov
Denys Kazakov

Reputation: 505

Use plain API requests to Azure mobile serivces

I wrote some basic Azure Mobile Service. For now it contains only one table but will grow further. What I wanted to do is to have an ability to send GET/POST requests to mobile service from my own desktop software.

I want to have this feature to make unit tests, blackbox testing and review overall backend behaviour using convenient way.

For now when I am trying to send request, for example:

https://mymobileservice.azure-mobile.net/tables/TodoItem

Got such response, which is obvious:

{ "message": "Authorization has been denied for this request." }

How to authorize please? Is there already ready to use solution for my needs?

Upvotes: 1

Views: 41

Answers (1)

user793891
user793891

Reputation:

You need to add the application key in the request headers. In the portal, look for the Manage Keys button at the bottom of the screen and grab the application key. In your desktop software code, add the X-ZUMO-APPLICATION header with the app key to your query.

Try testing it with Fiddler (on Windows) or Chrome with Postman before. https://www.getpostman.com/docs/requests

Check this Azure documentation page for more info: https://msdn.microsoft.com/en-us/library/azure/jj677199.aspx

Upvotes: 2

Related Questions