...
Code Block |
---|
|
POST https://portal.softapp-distribution.com/api/v1/user_token
{"auth": {"email": "foo@bar.com", "password": "secret"}} |
Example response from the API:
Code Block |
---|
|
201 Created
{"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"} |
To make an authenticated request to your API, you need to pass the token via the request header:
Code Block |
---|
|
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
GET |
...
https://portal.softapp-distribution.com/api/v1/skype_users |
The API responds with a 404 Not Found
when the user cannot be found or the password is invalid. This is a security best practice to avoid giving away information about the existence or not of a particular user.NB: HTTPS should always be enabled when sending a password or token in your request.