Community
Forma Developer Forum
Welcome to Autodesk Forma Developer Forum. Share your knowledge, ask questions, and explore popular Forma API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Authorization failure while using Forma SDK

1 REPLY 1
SOLVED
Reply
Message 1 of 2
bilalSN53S
425 Views, 1 Reply

Authorization failure while using Forma SDK

When attempting to acquire a token using Forma SDK, I encounter an "invalid_credentials" issue. After configuring Forma.auth with the client ID, callback URL, and scope, calling Forma.auth.acquireTokenOverlay() opens the callback URL in a window. Upon closing this window, an error is displayed stating:

 

{
    "error": "invalid_credentials",
    "error_description": "The client credentials are invalid."
}

 

Despite ensuring that the client ID and other parameters are correct (verified through successful calls using the same client ID in Postman), the issue persists.

Tags (1)
1 REPLY 1
Message 2 of 2

Hi @bilalSN53S,

 

Thanks for reaching out. Have you made sure that you have created the correct APS application? When acquiring a token in an embedded view the APS app you use needs to be the one called "Desktop, Mobile, Single-Page App"(see image below), which is the only one supporting the OAuth PKCE flow.

 

When I use a Traditional Web App in my extension I get the same error as you, but it works fine when I use the PKCE app. 

 

Hopefully that helps, and let me know if you face any more issues!

 

Martin from Autodesk Forma

martinnordbyjohansen_0-1711018212743.png

 


Martin Nordby Johansen
Software engineer at Autodesk Forma

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report