"Struggling to Obtain Access and ID Tokens in Acumatica Integration"

  • 9 April 2024
  • 1 reply
  • 37 views

Userlevel 1

I am currently attempting to obtain an access token using the Authorization Code Flow in Acumatica. I've successfully acquired the access code using Postman and the Authorization Code documentation. However, I'm encountering difficulties in obtaining the access token because I'm unsure where to configure the JSON Web Key (JWK) and JSON Web Key Set URL to facilitate this process.

Previously, I generated an access token using the Resource Owner Password Credentials Flow. However, I now require an ID token, which is only achievable through the Authorization Code Flow. To accomplish this, I need the 'client_assertion' key, which I plan to include in the request body. As per the documentation, I've created a Client Application, but I'm struggling to locate the 'Add JSON Web Key' dialog box and 'Add JSON Web Key Set URL'.

I've attempted two methods: passing the key-value pair in the parameters, which resulted in an 'invalid_client' error, and passing the key-value pair in the request body, which also resulted in an error. While I understand that an HTTPS request is necessary, my company has informed me that this will be addressed during the production phase, which is a few days away. However, I need to acquire the access token now to progress with the integration project. I'm currently stuck at this phase and need guidance on obtaining both the access token and ID token.

Could someone please provide assistance on completing these steps to obtain both tokens?"

Authorization Code GET Request 
Here i am able to get the authorization using the get request and was able to generate the access code.

 

1.Invalid Client Error 
Here i have passed all the key value pairs in the Params and Body as well also have provided the content type as “application/x-www-form-urlencoded” in the headers and getting the “invalid_cleint” error. 

2.In my second attempt, I provided the key-value pair in the request body, but I'm unsure where to find the value for the 'client_assertion' parameter.

POST REQUEST BODY

 

Headers 

Headers in the POST request 


Resource Owner Password Flow 

By this method i was able to get the access token but i need the Id token using Authorization code flow 
 


1 reply

Userlevel 7
Badge +4

@tanya007 

See the documentation @ Authorization Code Flow: Obtaining of an Access Token and ID Token

For the client application that uses JSON Web Token (JWT) Bearer Tokens, the client assertion type, which must be set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer

 

Integration Development: Support for JWT Bearer Tokens for Client Authentication

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved