Generate a Bearer Token
POST
https://sand-api.monoova.com/au/security/oauth-v1/Token
Responses
200
- TokenResponseDescription
- tokenstringExampleDescriptionDefaulteyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjEwMDQ4MDAsImV4cCI6MTc2MTAwODQwMH0.x1gXndPwqQy7R5IPDu2aND26vkx3SZ0GU_LS-VOg7RAPattern^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$
400
- ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "VALIDATION_ERROR", "errorMessage": "One or more validation failures have occurred" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultVALIDATION_ERRORPattern^[A-Z0-9_]{1,64}$
- errorMessagestringExampleDescriptionDefaultOne or more validation failures have occurredPattern^.+$
401
500
- ErrorResponseExample
{ "traceId": "f1a7fbd7-ca39-4b98-b247-f4e0e004f152", "errors": [ { "errorCode": "UNEXPECTED_ERROR", "errorMessage": "Internal server error. Please contact Monoova support." } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- errorsErrorDto[]Description
- errorCodestringExampleDescriptionDefaultVALIDATION_ERRORPattern^[A-Z0-9_]{1,64}$
- errorMessagestringExampleDescriptionDefaultOne or more validation failures have occurredPattern^.+$
curl
curl --request POST \
--url https://sand-api.monoova.com/au/security/oauth-v1/Token \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://sand-api.monoova.com/au/security/oauth-v1/Token", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://sand-api.monoova.com/au/security/oauth-v1/Token")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://sand-api.monoova.com/au/security/oauth-v1/Token"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK. Returns the bearer token.
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjEwMDQ4MDAsImV4cCI6MTc2MTAwODQwMH0.x1gXndPwqQy7R5IPDu2aND26vkx3SZ0GU_LS-VOg7RA"
}400
// Bad Request. The request is invalid. Check errors for details.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "VALIDATION_ERROR",
"errorMessage": "One or more validation failures have occurred"
}
]
}401
// Unauthorized. Authentication failed because the mAccount number or API key is missing or incorrect. After 10 failed authentication attempts, your account is blocked and requests return 401 until you roll your API key in the Monoova portal.
500
// Internal Server Error. An unexpected error occurred. Try again later and contact Monoova support if the problem persists.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "VALIDATION_ERROR",
"errorMessage": "One or more validation failures have occurred"
}
]
}