Sessions API returning 400 status.

Komal trivedi6 years ago

I have developed my own traccar client using NativeScipt. But the session POST service returns 400-Bad request in response. This happens only for this request, rest all the APIs work fine. Also, sessions api works fine on the portal and also through postman.
This is the data i am sending:

"{email": "admin", "password": "admin" }"

Please help.

Anton Tananaev6 years ago

Your JSON is invalid. Also, I'm not sure why you are sending JSON when documentation clearly says that you should use form.

Komal trivedi6 years ago

The JSON was a typing mistake. Although, thanks for pointing it out. It is working now.