Validate Token
GET
https://api.mpay.com.au/token/v1/validate/{token}
Path Parameters
- tokenstringrequiredExampleDescriptionDefault0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47Pattern^[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}$
Responses
200
- tokenValidateResponse_V1Example
{ "durationMs": 42, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- durationMsinteger<int64>ExampleDescriptionDefault42Formatint64Minimum0
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyMax Length500Pattern^.{0,500}$
400
- errorResponse_V1Example
{ "durationMs": 12, "status": "Error", "statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)" }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
401
- errorResponse_V1Example
{ "durationMs": 5, "status": "Unauthorized", "statusDescription": "Authentication failed. Provide a valid API key as the basic authentication username." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
404
- errorResponse_V1Example
{ "durationMs": 8, "status": "NotFound", "statusDescription": "The specified token could not be found." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
500
- errorResponse_V1Example
{ "durationMs": 30, "status": "Error", "statusDescription": "An unexpected error occurred while processing the request." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
curl
curl --request GET \
--url https://api.mpay.com.au/token/v1/validate/{token} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/token/v1/validate/{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://api.mpay.com.au/token/v1/validate/{token}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.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://api.mpay.com.au/token/v1/validate/{token}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Success. The token is valid.
{
"durationMs": 42,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request — the request could not be processed because one or more fields are missing, malformed or failed validation. Check statusDescription for the field at fault.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}401
// Unauthorized — the API key is missing, invalid, or not permitted to call this endpoint. Pass your API key as the basic authentication username with no password.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}404
// Not Found — no token matching the supplied identifier exists. A token returns this status once it has been deleted, so this response can be used to confirm a deletion succeeded.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}500
// Internal Server Error — the Platform encountered an unexpected condition and could not complete the request. Retry the request; if the error persists, contact Monoova support quoting the time of the call.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}