Skip to content

/api/reseller/login

POST
/api/reseller/login
curl --request POST \
--url https://dashboard.residential.rayobyte.com/api/reseller/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "test-reseller-email@example.com", "password": "z38Txxxf" }'

Authorization on the API side


The API uses login-password authorization with the generation of a temporary token. The token is valid for three hours.

The whole process is as follows:

  1. The Reseller receives a token by logging in with a login and password;
  2. The Reseller uses the token for all subsequent API requests.

In order to receive a token, the user must send a POST request to this endpoint, passing in the email and password in the request body. If the login and password are correct, a temporary token will be received in response.

Media typeapplication/json
object
email
required

Reseller email.

string
/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/
password
required

Reseller account password

string
>= 5 characters <= 64 characters
Examples

Valid input example

{
"email": "test-reseller-email@example.com",
"password": "z38Txxxf"
}

Logged in successfully

Media typeapplication/json
object
status
string
Allowed values: SUCCESS
date
string
token
string
Examples
ExampleSuccess

Reseller is successfully logged in

{
"status": "SUCCESS",
"date": "Mon, 1 Jan 2022 12:00:00 GMT",
"login": "reseller1",
"token": "HdI9s6/p4A7FZb5gIcT0Vg=="
}

Wrong account type

Media typetext/html
string
Examples
ExampleWrong account type

Wrong account type

{
"status": "FAIL",
"date": "Mon, 1 Jan 2022 12:00:00 GMT",
"error": "Wrong account type. Use a Reseller account"
}

API call failed

Media typeapplication/json
object
status
string
Allowed values: FAIL
date
string
error
string
Examples
ExampleInternal error

An unexpected error occurred while processing the request.

{
"status": "FAIL",
"date": "Mon, 1 Jan 2022 12:00:00 GMT",
"error": "Internal server error"
}

Was this page helpful?