Great news! The API now gives us a way to check which User is being used to access the API after Initial Authentication has been completed.
Request
URL
https://secure.myob.com/oauth2/v1/Validate?scope={scope}
The Scope used need to match the scope in your Authentication request. For the MYOB API for AccountRight & new Essentials this is CompanyFile.
The Method that is used a GET request.
Headers
Required headers that need to be passed are:
Authorization: Bearer {Access_token}
x-myobapi-key: {Your_API_Key}
Response
If successful, you will be returned a 200 OK response code. The response body will look this:
{
"username": "developers@myob.com",
"Uid": "16a13889-1961-4791-a726-e51bc93d283e",
"utc_token_expiry": "2021-03-23 22:24:39Z"
}
If for any reason the call is unsuccessful, then a 401 Unauthorized is return.
Any questions feel free to reach out to the API Support Team by logging a ticket here.
Comments
0 comments
Article is closed for comments.