-1

add .env file but not work, also try to add launch.json but still od not work. any suggestion plz.

I am using vscode so unable find enviorement variable to set client id & secret.

    {Hosting environment: Production Content root path: e:\New folder\IMP\AF\forge-rimconfigurator-inventor-master\InventorDA
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.
Unhandled exception. Autodesk.Forge.Client.ApiException: Error calling Authenticate: { "developerMessage":"The client_id specified does not have access to the api product", "moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/", "errorCode": "AUTH-001"}
   at Autodesk.Forge.TwoLeggedApi.AuthenticateAsyncWithHttpInfo(String clientId, String clientSecret, String grantType, Scope[] scope)
   at Autodesk.Forge.TwoLeggedApi.AuthenticateAsync(String clientId, String clientSecret, String grantType, Scope[] scope)
   at InventorDA.Controllers.OAuthController.Get2LeggedTokenAsync(Scope[] scopes) in e:\New folder\IMP\AF\forge-rimconfigurator-inventor-master\InventorDA\Controllers\OAuthController.cs:line 72
   at InventorDA.Controllers.OAuthController.GetInternalAsync() in e:\New folder\IMP\AF\forge-rimconfigurator-inventor-master\InventorDA\Controllers\OAuthController.cs:line 58
   at InventorDA.Controllers.DesignAutomationController.CreateBucket() in e:\New folder\IMP\AF\forge-rimconfigurator-inventor-master\InventorDA\Controllers\DesignAutomationController.cs:line 254
   at InventorDA.Controllers.DesignAutomationController.Post(ModelAttributes value) in e:\New folder\IMP\AF\forge-rimconfigurator-inventor-master\InventorDA\Controllers\DesignAutomationController.cs:line 70
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()}

Regards,

Dhaval

Dhaval3112
  • 11
  • 3
  • Could you please add the contents of that screenshot as text, read this to see why: [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors), and make sure you take the [tour](https://stackoverflow.com/tour), and check out the [help center](https://stackoverflow.com/help) especially [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) to better understand how this website functions and improve your chances at getting help. Good luck. – Abderrahmene Rayene Mihoub May 26 '23 at 16:06

1 Answers1

0

According to the error you obtained:

Autodesk.Forge.Client.ApiException: Error calling Authenticate: { "developerMessage":"The client_id specified does not have access to the api product", "moreInfo": "https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/", "errorCode": "AUTH-001"}

Your APS app doesn't have permission to access one required API that this project requires.

Please make sure you enable at least Design Automation, Model Derivative, and Data Management for your app, just like in our tutorial

enter image description here

João Martins
  • 388
  • 3
  • 10