Authenticate
Obtain a JSON Web Token to authenticate with the API (see
Authentication). You can use this endpoint to authenticate with an email and
passphrase combination by providing email
and pass
parameters in the body, or
by matching a stored OAuth 2.0 token by providing provider
and id
parameters
in the body. If we can authenticate the parameters provided, the endpoint returns a JSON Web Token which
can authenticate you to other API endpoints for the next 15 minutes.
Request
Request body data | Value type | Value |
---|---|---|
email |
string |
If provided along with pass , tries to authenticate by email and passphrase. |
pass |
string |
If provided along with email , tries to authenticate by email and passphrase. |
provider |
string |
If provided along with id , tries to authenticate by OAuth 2.0 token. |
id |
string |
If provided along with provider , tries to authenticate by OAuth 2.0 token. |
Examples
Response
If the API can authenticate your credentials, you receive a 200
HTTP status along with a
plain text response, providing your JSON Web Token. This encrypted string includes data about your
session and will remain valid for the next 15 minutes. With this token, you can use the
renew authentication endpoint to get a new token, keeping your session
over periods much longer than 15 minutes. If the API cannot authenticate you, it responds with a
401
HTTP status.