http api 401 error

  • Last Post 16 January 2014
CastroOCR posted this 13 January 2014

I have tested my user name and password in the ios app and it works. When i am trying to implement the http request, I get a 401 error. I am using Parse cloud code, but it is very similar to javascript.

I don't understand what the documentation means by "Authorization: Basic <applicationid:applicationpassword>" *I have tried to put the username and password in URL: url : "", method : 'POST', body : image.buffer,

  • I have tried adding the line as a header: url : "", method : 'POST', body : image.buffer, headers: { 'Authorization' : 'Basic AppId:password', }, Can someone clarify?

Anastasia Galimova posted this 16 January 2014

In the C# sample you can find what header should be specified.

I don't know how exactly it should be done in your development environment, probably in the same way as in JavaScript sample.

You should make sure that the request has the correct header and body (in particular, that it is encoded in base64). You can use HTTP debugger for this task (Fiddler or any other that is suitable for your platform).