Search code examples
iphoneandroidwcfwcf-client

Consuming wcfRest service from android/iphone


I need some good suggestions and ideas.

I have wcfRest service and the client is iPhone and Android. The client will GET and POST data.

I also made an API key which is a GUID, for the client.

BUT, do the client need to supply the api key with every method they request?? Or is there any way that I can store in the session or something??

for example:

json/getUserDetails/{userID}/{apikey}

json/saveUser/{apikey}


Solution

  • You'll have to send something on each request - whether it's the API key or an authenticated header, you need a way to authenticate the caller. So the easiest way would be to send the api key with each request, although using the header is a better idea.