Create OneShot Security Token
GET
https://api.mpay.com.au/security/v1/createOneShotSecurityToken/{timeOutMin}
Path Parameters
- timeOutMinstringrequiredExampleDescriptionDefault15Pattern^([1-9]|1[0-5])$
Responses
200
- CreateOneShotSecurityTokenResponse_V1Example
{ "oneShotSecurityToken": "8f4c2b7a3d194e6c9f285b7e1a0c6d34", "durationMs": 21, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- oneShotSecurityTokenstringrequiredExampleDescriptionDefault8f4c2b7a3d194e6c9f285b7e1a0c6d34Pattern^[A-Za-z0-9+/=_-]{16,512}$
- durationMsinteger<int64>requiredExampleDescriptionDefault21Formatint64Pattern^[0-9]{1,19}$
- statusstringrequiredExampleDescriptionDefaultOkPattern^[A-Za-z]{1,50}$
- statusDescriptionstringrequiredExampleDescriptionDefaultOperation completed successfullyPattern^.{0,500}$
400
- ErrorResponse_V1Example
{ "durationMs": 12, "status": "Error", "statusDescription": "The request is invalid. One or more parameters are missing or do not match the expected format." }Description- durationMsinteger<int64>requiredExampleDescriptionDefault12Formatint64Pattern^[0-9]{1,19}$
- statusstringrequiredExampleDescriptionDefaultErrorPattern^[A-Za-z]{1,50}$
- statusDescriptionstringrequiredExampleDescriptionDefaultThe request could not be processed. See statusDescription for details.Pattern^.{0,500}$
401
- ErrorResponse_V1Example
{ "durationMs": 8, "status": "Unauthorized", "statusDescription": "Authentication failed. Supply a valid API key as the basic authentication username." }Description- durationMsinteger<int64>requiredExampleDescriptionDefault12Formatint64Pattern^[0-9]{1,19}$
- statusstringrequiredExampleDescriptionDefaultErrorPattern^[A-Za-z]{1,50}$
- statusDescriptionstringrequiredExampleDescriptionDefaultThe request could not be processed. See statusDescription for details.Pattern^.{0,500}$
Response Headers
- WWW-AuthenticatestringExampleDescription
500
- ErrorResponse_V1Example
{ "durationMs": 35, "status": "Exception", "statusDescription": "An unexpected error occurred while processing the request. Please retry or contact support." }Description- durationMsinteger<int64>requiredExampleDescriptionDefault12Formatint64Pattern^[0-9]{1,19}$
- statusstringrequiredExampleDescriptionDefaultErrorPattern^[A-Za-z]{1,50}$
- statusDescriptionstringrequiredExampleDescriptionDefaultThe request could not be processed. See statusDescription for details.Pattern^.{0,500}$
curl
curl --request GET \
--url https://api.mpay.com.au/security/v1/createOneShotSecurityToken/{timeOutMin} \
--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/security/v1/createOneShotSecurityToken/{timeOutMin}", 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/security/v1/createOneShotSecurityToken/{timeOutMin}")
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/security/v1/createOneShotSecurityToken/{timeOutMin}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// successful validation
{
"oneShotSecurityToken": "8f4c2b7a3d194e6c9f285b7e1a0c6d34",
"durationMs": 21,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad request — the request could not be validated. Check that every required parameter is supplied and that each value matches the documented pattern.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "The request could not be processed. See statusDescription for details."
}401
// Unauthorized — the API key passed as the basic authentication username is missing, invalid, or the Sign-In Account does not have permission to call this endpoint. After five consecutive failures on the live Engine the Sign-In Account is locked for one hour.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "The request could not be processed. See statusDescription for details."
}500
// Internal server error — an unexpected error occurred while the Engine was processing the request. The request should be retried; if the error persists, contact Monoova support.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "The request could not be processed. See statusDescription for details."
}