In order to make API calls, you need first to create an authentication token. The token is a hashed key that is required in every modulus® API call.
Request
| API Name |
AuthenticateToken |
| URL |
https://your_account.modulus.biz/api/cmn/AuthenticateToken |
| Method |
POST |
| Source |
Third Party Server |
| Recipient |
modulus® Server |
| Content Type |
Application/Json |
Request Body
| Parameter |
Description |
| Username |
Username of the user that has permission to call the needed endpoint. |
| Password |
The password of the user. |
Responses
| HTTP Status |
result |
title |
message |
object |
| Success Responses |
| 200 OK |
true |
Success |
Authentication succeeded. |
{
"result": true,
"title": "Success",
"message": "Authentication succeeded.",
"object": "XXXXXXXXXX"
}
|
| Failure Responses |
| 400 Bad Request |
false |
Bad Request |
Missing one or more of parameters: username and password.
|
null |
| 401 Unauthorized |
false |
Unauthorized |
Authentication failed. |
null |
Please note that authentication token expires 15 minutes after creation.
Example
| Request |
curl --request POST 'https://your_account.modulus.biz/api/cmn/AuthenticateToken' \
--header 'Content-Type: application/json' \
--data '{"username": YOUR_USER_NAME, "password": YOUR_PASSWORD}'
|
| Success Responses |
| 200 OK |
{
"result": true,
"title": "Success",
"message": "Authentication succeeded.",
"object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
|
| Failure Responses |
| 400 Bad Request |
{
"result": false,
"title": "Bad Request",
"message": "Missing one or more of parameters username and password.",
"object": null
}
|
| 401 Unauthorized |
{
"result": false,
"title": "Unauthorized",
"message": "Authentication failed.",
"object": null
}
|