Login
This endpoint allows you to obtain a token with which the other requests to MSV Service are authenticated.
The username and password fields required for this endpoint are provided by the system administrator.
Request
- Name
username- Type
- string
- is Required
- REQUIRED
- Description
Application username
Example:RestService
- Name
password- Type
- string
- is Required
- REQUIRED
- Description
User-defined password
Example:password
Request
curl -X "POST" {{baseURl}}/api/login \
-H "Content-Type: application/json" \
-d '{
"username": "RestService",
"password": "password"
}'
Response
Successful authentication; returns the access_token and secret_token
- Name
status- Type
- object
- is optional
- Description
- Name
access_token- Type
- string
- is optional
- Description
User access token
Example:5d791fa9-91c2-401a-a20e-8e9569e5edec|gYs7WRqfd2NEgiJHOWbaXmyESa1JH4Gs98FDfXBE
- Name
secret_token- Type
- string
- is optional
- Description
User secret token
Example:DYJKxUKzgzFaXK2UYkqOy6xd7X1suCnn
Response
{
"status": {
"status": "OK",
"reason": null,
"message": null,
"date": "2022-08-16T13:12:18+00:00"
},
"access_token": "5d791fa9-91c2-401a-a20e-8e9569e5edec|gYs7WRqfd2NEgiJHOWbaXmyESa1JH4Gs98FDfXBE",
"secret_token": "DYJKxUKzgzFaXK2UYkqOy6xd7X1suCnn"
}
The response contains two values with different purposes: access_token goes in the Authorization: Bearer <token> header of the other endpoints, and secret_token is never sent — it is the key with which you verify the webhook signature.
The access credential (access_token) is valid for 24 hours from the moment it is issued. After that period it stops working and a new one must be requested through the authentication endpoint.
Important: requesting a new credential immediately invalidates all previously issued credentials for the same user, regardless of whether they were still valid. For this reason, if your integration runs multiple instances or processes that request credentials independently, we recommend centralizing credential retrieval and renewal in a single point to avoid different processes requesting credentials separately and invalidating each other.