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=[SME_SCOPES]
The Scope used need to match the scope in your Authentication request.
Please note: As of 12th March, all new API keys created after 12th March 2025 must be authenticated with new scopes. [SME_SCOPES] in the above URL must be one or more of the new new scopes, and the CompanyFile scope will no longer work. For all keys created prior to 12th March 2025, the scope CompanyFile should be used and the new scopes will not work for keys created prior to 12th March 2025.
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.