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
November 4, 2024

Hello Msommer,

I have followed your Steps to reproduce and am getting the same result.  Investigating now, and will be in touch soon.

Michael B
Lucid product team
November 4, 2024

Status Update:

 

I have been unable to find a cause and have reached out to Senior Engineers for support. I expect that sometime tomorrow we will be able to identify what is causing the failure and provide a ETA when we expect it to be fixed.

Thank you for your patience.

msommerAuthor
November 4, 2024

Thanks Michael, 

 

I appreciate the updates!

Michael B
Lucid product team
November 5, 2024

Msommer,

 

Can you try again now? I believe we have resolved the issue, but am not absolutely sure its the one affecting you.

msommerAuthor
November 5, 2024

Hello Michael,

 

I am still getting the 404 not found. 

Michael B
Lucid product team
November 5, 2024

Hmmm, very strange. We are getting inconsistent behavior. Continuing my investigations.

msommerAuthor
November 5, 2024

Are you now getting the expected results? 

msommerAuthor
November 5, 2024

One thing to note. For this api call, I am entering a dummy origin parameter.

When I inspect the returned JWT, it looks correct, but would passing the jwt/token to this api with some dummy origin result in a NOT FOUND? 

msommerAuthor
November 5, 2024

Also, side question about this api. Are there any document side effects associated with this call such as permissions mutations or the doc being published as a result of calling this API for a particular document? 

Michael B
Lucid product team
November 5, 2024

`Not Found` should only be returned if the `document` or the `embed` can not be found. I believe there is an issue with the data-store on our side causing the issue. That is under investigation.

No, there are no side-effects with the calls themselves. Creating an embed and embedding cause no change in permission to the documents in and off themselves. Where you post the embed and what users do on the document in the embed could affect access, but these API calls themselves do not.