Skip to main content

I'm trying to access the LucidChart API via the following documentation:


https://developer.lucid.co/api/v1/#overview


I'm using the OAuth 2.0 client. I obtained a Client ID and Client Secret. What is not clear to me is that the App Registration step is the section around the URI and what needs to be done to fill out. Below are the steps in the API documentation.


App registration



Note: Registering a new application requires Team Admin permissions for the Lucid account.


To set up an app to use OAuth 2.0 perform the following steps:



  1. Obtain an OAuth 2.0 client ID and client secret from the account's Lucid team administration page.

  2. Register at least one redirect URI on that page. Lucid will redirect the user to this location once they have granted access. This should be a URL that the app controls. Lucid will append the authorization code to the URL in the code query parameter.


Test redirect URI

As a service Lucid provides a redirect uri that can be used to allow the user to copy the authorization code to the clipboard.


To use it register the redirect URI:


https://lucid.app/oauth2/clients/{client id}/redirect


When this redirect URI is used and a user grants access to the app Lucid will redirect the user to a page on our site where they can view and copy the authorization code.



 


 

Hi Chirag thank you for contributing to the Lucid Community! We will follow-up tomorrow with a response to your question.


Thank you in advance for your help and patience!


hey Richard just following up to see if you had an update? thanks!


Hi Chirag thank you for following up. We've responded to your question directly in the Support ticket you submitted. 


Just modify the redirect Uri to your Web application.


Hope that helps


Thanks @michel l!


For any future viewers of this thread - here's a breakdown of the steps in our documentation:




  1. Obtain Client ID and Client Secret: You've already obtained these from your Lucid team administration page which is great.




  2. Register Redirect URI: This step is crucial. You need to specify where Lucid should redirect the user after they grant access. This should be a URL controlled by your app. Lucid will append the authorization code to the URL as a query parameter called code. For example if your app's URL is https://example.com the redirect URI could be https://example.com/auth-callback.




  3. Test Redirect URI: Lucid offers a convenient redirect URI for testing purposes. You can register it as follows:



    • Redirect URI: https://lucid.app/oauth2/clients/{client id}/redirect


    When you use this redirect URI and a user grants access to your app Lucid will redirect them to a page on their site where they can view and copy the authorization code.




Make sure that your app's logic is set up to capture the code parameter from the redirect URL and use it to complete the OAuth 2.0 flow. If you have any more questions or need further assistance feel free to ask! Good luck with your Lucid API integration. 🚀

If you're looking for support using Lucid's Public APIs head over to the Lucid for Developers Community! We're here to help.


@Richard Udell I am getting the “no valid scopes available” error but I have set the scope in the request for code url to account.user which I found on the list of scopes in the documentation, https://developer.lucid.co/reference/access-scopes. Does my app need permission to the scopes before creating the code?


Hi ​@Amanda.DeLeo!

 

Does my app need permission to the scopes before creating the code?

Yes! The authorization URL used to generate the authorization code must include the scopes you’d like to have in your OAuth2 token.

 

To make sure I’m fully grasping the issue, can you please share your authorization URL and the specific endpoint you’re requesting?


@Richard Udell I was using the wrong url,

 

versus

 

Once I switched to the correct url it worked. Thanks for getting back to me!


I’m glad to hear that! Thanks for reporting back the solution. Don’t hesitate to reach out if anything else comes up.


@Richard Udell 

 

I am trying to get started with Lucid apis. The basic thing I am trying to do is get a list of licensed users. However when I use the below url using my admin account I get client ID missing. I have looked through so many documents however I couldn't find it. Can you suggest the next steps to make it work?


Hey ​@Vamsi_K_Lucid. Happy to help here.

 

The first step here is to create an OAuth2 Client. We have a thorough guide here on how to do so. 

Once you have created the client and the redirect uri is defined, you can then fill out the authorization link to have the requisite query parameters, including the client id, redirect uri, and scopes. It should be of the following form: 

https://lucid.app/oauth2/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&scope=<scopes>

It is worth pointing out that there are two versions of the authorize endpoint. One for account tokens and one for user tokens. The options can be seen here. For most cases a user token is sufficient, but your use case may require an account token. If you are unsure, review the endpoints you are looking to use and see what access scope types they accept. 

 

We have a short guide for how to obtain an access token that can be found here that may also be of assistance. 

 

Please let me know if you run into any other issues that I can be of assistance on.


Thanks ​@chasefreeman . I will give this a try and get back to you. 

When we turn ON the developer version, is it turned on for user to user?

Appreciate it !!!


There are two options for unlocking developer tools. A thorough guide can be found here, but I can give a brief description as well.

Some accounts allow users to self-select into seeing developer tools and the developer portal via a toggle in the user settings page. This toggle is on a per-user basis so some may have it on and some may not. Enterprise accounts have the option to disable this toggle for all users if there is any concern with users having opt-in access to these tools. Note that if disabled, regardless of the current state of the toggle, the user will be unable to access developer tools unless granted the Developer role. This is the other option. Users should be able to be granted the Developer role via the admin panel. Users granted this role will have access to the developer tools always unless the role is revoked. This is also granted on a per user basis.

 

Hope this helps and please let me know if you have any more questions!


Reply