Skip to main content

 

Created connected applciation and flow type is Hybrid
based on the doc here https://help.acumatica.com/(W(19))/Help?ScreenId=ShowWiki&pageid=9cd888ba-aa9a-4140-b5e9-4da297fade89

I should be able to do get request and redirect to 
https://<Acumatica ERP instance URL>/identity/connect/authorize

I’m sending all the needed paramters but at the end I’m getitng this error

“Sorry, there was an error : unauthorized_client"

Not sure what can be the possible reason, the user that created the app has administrator priviliges already and assigned to all roles.

@safetynetweb check that the redirect_uri parameter is exactly the same in Acumatica and in your request


Thanks @Dmitrii Naumov 

I checked and confirmed yes they are identical but still getting same error 


Instead of using Hybird method which didn’t work for me after many tries not sure why, I implemented hte password method to get the refresh token, and then I used the refresh token to get access tokens for future uses

 

$req =  
'grant_type' => 'password',
'client_id' => $client_id,
'client_secret' => $client_secret,
'username' => $username,
'password' => $password,
'scope' => 'api offline_access'
];

//the above get the refresh token, then next I use it to get the access token

$req =
'grant_type' => 'refresh_token',
'client_id' => $client_id,
'client_secret' => $client_secret,
'refresh_token' => $refreshToken
];

 


Thank you for sharing your solution with the community @safetynetweb!


Reply