Skip to content

Embedding Quicksight GenerativeQnA (Embedding failed because of invalid URL or authorization code.

0

I want to embed Quicksight GenerativeQnA. Created server in flask/python which is running and getting embed_url and sanitizing it. On frontend I have created a script which gets data.

try {
    const qSearchBar = await QuickSightEmbedding.createEmbeddingContext();
    const result = await qSearchBar.embedGenerativeQnA(options);
    console.log('QuickSight Q Embed Success:', result); // Getting this
} catch (error) {
    console.error('QuickSight Q Embed Error:', error);
    document.getElementById('errorMessage').innerText = `Embedding Error: ${error.message}`;
}

Getting Quicksight Q Embed Success but on browser I am getting"Embedding failed because of invalid URL or authorization code." Enter image description here

As a result I am not able to see the embedded component.

asked 2 years ago472 views

1 Answer
0

The issue you're experiencing with embedding Amazon QuickSight GenerativeQnA seems to be related to the URL or authorization code, despite receiving a success message in your console log.

To resolve this, consider the following steps:

  1. Verify that the embed URL generated by your server is correct and hasn't expired. QuickSight embed URLs are typically one-time use and have a short expiration time.

  2. Ensure that the authorization process is correctly implemented. The GenerativeQnA embedding requires proper authentication for registered users.

  3. Double-check the configuration in your options object. Make sure it includes all necessary parameters for GenerativeQnA embedding, such as the correct URL, session tags, and any required permissions.

  4. Verify that the AWS Identity and Access Management (IAM) role or user associated with your application has the necessary permissions to embed QuickSight GenerativeQnA.

  5. Check if there are any CORS (Cross-Origin Resource Sharing) issues. Ensure that your QuickSight domain is properly configured to allow requests from your application's domain.

  6. Review the network requests in your browser's developer tools. Look for any specific error responses from the QuickSight service that might provide more details about the authorization failure.

  7. Make sure you're using the latest version of the QuickSight Embedding SDK, as there might be updates specifically for the GenerativeQnA feature.

If the issue persists after checking these points, you may need to reach out to AWS support for further assistance, as there could be account-specific configurations or limitations affecting the embedding process.

Remember that embedding the GenerativeQnA experience is a relatively new feature in QuickSight, so ensure you're following the most up-to-date documentation and best practices provided by AWS for this specific embedding scenario.

Sources
Embedding the Amazon QuickSight Q search bar (Classic) - Amazon QuickSight
RegisteredUserEmbeddingExperienceConfiguration - Amazon QuickSight

answered 2 years ago

AWS
SUPPORT ENGINEER

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.