Introduction The purpose of this sample is demonstrate a quick way to test and obtain your three legged tokens using PKCE method in the context of a single page app (you can refer here for more details).
The add-in is a simple Revit add-in that will authenticate with Autodesk Desktop Authentication using PKCE method. The add-in will open a browser window to authenticate with Autodesk Desktop Authentication. Once authenticated, the add-in will obtain the access token and refresh token and store them in the Revit document.
- Create a application from website
aps.autodesk.com
- Copy the
client_id
value to environment variableCLIENT_ID
or use command line to set the value
set CLIENT_ID=your_client_id
- Create a callback URL in the format
http://localhost:8080/api/auth/callback
and add it to theRedirect URIs
in the application settings, and then replace inside the code at command
string callBackUrl = "http://localhost:8080/api/auth/callback";
- Debug the add-in and run command demo example to see the authentication process and token.
The repository is licensed under the MIT license. For more information see the LICENSE file.
- Github 3Leg CSharp - https://github.com/chuongmep/aps-toolkit-3leg-csharp
- Auth PKCE Csharp - https://github.com/chuongmep/aps-tookit-auth-3leg-pkce
- Auth 3Leg Python Autodek - https://chuongmep.com/posts/2024-05-01-get-3leg-aps-with-python.html
- https://github.com/ricaun-io/ricaun.Revit.UI.Tasks
- https://github.com/autodesk-platform-services/aps-pkce-desktop-app
- https://github.com/autodesk-platform-services/aps-pkce-webapp
- https://aps.autodesk.com/blog/new-application-types
- https://github.com/JoaoMartins-callmeJohn/PKCE-TEST