Skip to main content
Solved

Connected Application

  • October 9, 2024
  • 4 replies
  • 430 views
  • Translate All

Forum|alt.badge.img

 

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.

Best answer by safetynetweb

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
];

 

View original

4 replies

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

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

Translate

Forum|alt.badge.img

Thanks @Dmitrii Naumov 

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

Translate

Forum|alt.badge.img
  • Author
  • Varsity III
  • Answer
  • October 14, 2024

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
];

 

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • October 14, 2024

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

Translate