Stuck while trying to create an embed url using python sdk

Hi,

So i was trying to generate an embed URL using the API function  POST/api/3.1/embed/sso_url. i am not able to understand what should I pass through secret id because it doesn't take embed secret as an input. if I leave it blank it raise an error- Embed URI is not valid:

  • 'signature' param failed to authenticate
1 3 314
3 REPLIES 3

Hi @shaurya1,

This is a great question. Just to clarify you are using, the sdk.create_sso_embed_url option, correct? The secret should not be required insofar as if the secret is not specified, the URL will be signed with the newest active embed secret defined in the Looker instance. This is one of the main advantages to using the REST api endpoint compared to our examples SSO URL generation scripts. I would definitely try to possibly reset the embed secret on the instance. If you manually add the secret as an arg to the method, does the URL work for you?

Thanks,

Eric

Hi @Eric_Lyons,

Yes, I am using sdk.create_sso_embed_url(). So the thing that confused me is the parameter secret_id that is used in that function is of type int() but my embed secret is an alpha-numeric string due to which if I manually add my secret, it raises a validation error!

Hi @shaurya1,

The secret_id is actually different than the embed secret. Secret_id is a parameter based on having multiple secrets per instance. We do not offer this functionality right now, but our development team added the parameter to allow users to have this ability in the future. This is also why this parameter is a type int() because it is actually the ID in the internal database of the secret. 

Please let me know if you have any questions!

Thanks,

Eric