/api/reseller/login
POST
/api/reseller/login
const url = 'https://dashboard.residential.rayobyte.com/api/reseller/login';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"test-reseller-email@example.com","password":"z38Txxxf"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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:
- The Reseller receives a token by logging in with a login and password;
- 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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
Reseller email.
string
password
required
Reseller account password
string
Examples
Valid input example
{ "email": "test-reseller-email@example.com", "password": "z38Txxxf"}No email passed
{ "login": "reseller1", "password": "z38Txxxf"}Responses
Section titled “Responses”Logged in successfully
Media typeapplication/json
object
status
string
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
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?
Thanks — that helps us fix it.