Skip to main content

Hi there


After getting an OAuth 1 token I'm able to make a call to https://app.lucidchart.com/documents/docs and see a list of documents associated with my account — this works fine.


When I attempt to make a call to https://app.lucidchart.com/api/graph/<documentID> I get a 400 error with the message 'Bad document state'.


I've tried a bunch of different document IDs but I get the same result each time.


Not sure if it matters but I'm currently on a team trial account attempting to assess viability of Lucidcharts for a project which requires API access.


Thanks :)

Edit: Updated with current information from our API team.


Hi Oliver thanks for posting in the Community! I'm confirming this with our API team and I'll update this thread in the next day or so once I have more information from them. You can find the latest documentation for the legacy Graph API with the correct URL here


Hi @emma d


I've just tried using https://lucid.app/api/graph/<id> but no luck! I get the same message.


<error>
<status>400</status>
<message>Bad document state</message>
</error>


I've also tried the Image API (https://app.lucidchart.com/documents/image/<documentId>/<pageNum>/<width>/<square>) with the same document and that works perfectly — I get a nice thumbnail of the graph I'm attempting to access. Unfortunately it's the graph API that I'm most interested in.


Actually! The new documents API works quite well for our purposes. I notice there's now a https://api.lucid.co/documents/<documentID>/state method which returns all the data. Assuming that's safe to use that should give us what we need :)


Hi Oliver thanks for following up. Our API team confirmed that they don't believe the URL is at fault here but without digging deeper into the requests and knowing the specific document IDs we can't yet say for sure why the previous calls were failing. Also  https://api.lucid.co/documents/<documentID>/state is not a documented endpoint so we can't say for sure what the potential implications of those API calls are. We would love to take a closer look at the issue so we can better understand your use-case and provide some more specific advice. I created a Support ticket from your post and we will reach out to you directly. 


Hi! Updating this thread with exciting news - we've recently launched Lucid for Developers a community space dedicated to supporting and connecting our users working with the Lucid API and our most technical features.



In this section the developers actually building Lucid’s APIs will be available to answer your most technical questions just like this one. Furthermore here we plan to announce new endpoints tools and guides to help you have the best possible experience developing on Lucid’s APIs. You can browse existing posts connect with other users with similar questions and goals and ask questions of your own by creating a new post or leaving a comment. Thank you and we're excited to hear from you!


Reply