Skip to main content
November 1, 2024
Solved

Embed Viewer API Doc returning NOT FOUND

  • November 1, 2024
  • 21 replies
  • 212 views

I am following this doc for creating a token based external embed. 

I have:

  1. Successfully created the access token
  2. Successfully created an embed session token
  3. Failed at calling the Embed Viewer endpoint with the embed session token get a 200 response.

I do not want to use the document picker component, so instead I have created a lucidchart document, generated an embedId for the document (confirmed docId is correct) by calling Create Document Embed, then use the embedId in step 2 above when creating the embed session token. 

 

However, I keep getting 404 Not Found when calling Embed Viewer with the embed session token. 

 

My access token has the following scopes: 

lucidchart.document.content.share.embed%20offline_access%20user.profile%20lucidchart.document.app.picker.share.embed

 

Do I need to modify my document in someway so that it is embeddable? (e.g. activate the embed code via the UI or publish the doc)?

 

Steps to reproduce 

  1. Create lucidchart and do NOT publsh, activate embed, or anything else. 
  2. Create access token with scopes listed above
  3. Call create document embed by passing the documentId from step 1 to get an embedId
  4. Call embed session token with embedId from step 3 to get an embed session token
  5. Call Embed Viewer with embed session token from step 4 and observe a 404. 

NOTE I am making the requests from the api docs, not cURL via command line. 

 

 

Best answer by chasefreeman

The `https://lucid.app/embeds….` is the URI that I would use for both testing and for the application you are building.

 

There is a long form explanation for this, but the short answer is yes. The other endpoints you listed are correct with regards to their URL. The embedded viewer is a unique case where the `api.lucid.co` URI is not used in favor of the `lucid.app` counterpart. 

 

Please let me know if that answers your question and if you run into any additional issues. 

Comments

Michael B
Lucid product team
December 19, 2024

Fantastic. Glad to hear this is resolved before we get into the holiday window and communication slows down.