We use Laravel Passport behind the scenes to generate industry standard OAuth bearer tokens.
{info} The url for generating a token is:
https://app.safestream.info/api/v1/token
.
Method | URI | Headers |
---|---|---|
POST | /token |
Content-Type: application/json |
None
{
"email" : "required|string|email",
"password" : "required|password"
}
The content-type of application/json only needs to be set if raw JSON is sent in the body.
{info} The
password
is the same as you have registered your account from the dashboard.
{info} Token request example
{
"email" : "[email protected]",
"password" : "fake_password"
}
{success} Success Response
Code 200
Content
{
"data": {
"api_bearer_token": "eyJ0eXA....s_qrQ"
}
}
{danger} Error Response, the data params are missing or can't authorize the user.
Code 403
Reason This action is unauthorized
Content
...