Retrieve Public Key
code examples curl request get \\ \ url https //api mpay com au/public/v1/certificate/public key \\ \ header 'accept application/json'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/public/v1/certificate/public key", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api mpay com au/public/v1/certificate/public key") 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 import requests import json url = "https //api mpay com au/public/v1/certificate/public key" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful validation the public key was retrieved { "publickey" "30820122300d06092a864886f70d01010105000382010f00", "durationms" 18, "status" "ok", "statusdescription" "operation completed successfully" }// bad request — the request was malformed or failed validation review the errors array, correct the request and try again { "status" "invalid", "statusdescription" "the request failed validation ", "durationms" 5, "errors" \[ { "code" "invalidrequest", "message" "the request could not be understood by the server ", "field" "" } ] }// unauthorized — authentication credentials are missing, malformed or not valid for this environment { "status" "invalid", "statusdescription" "the request failed validation ", "durationms" 5, "errors" \[ { "code" "invalidrequest", "message" "the request could not be understood by the server ", "field" "" } ] }// internal server error — an unexpected error occurred while processing the request retry the request; if the problem persists, contact monoova support { "status" "invalid", "statusdescription" "the request failed validation ", "durationms" 5, "errors" \[ { "code" "invalidrequest", "message" "the request could not be understood by the server ", "field" "" } ] }