Create a referrals embed token for the given partner/tenant.
from dub import Dub with Dub( token="DUB_API_KEY", ) as d_client: res = d_client.embed_tokens.referrals(request={ "partner": { "email": "Letha_Wuckert2@yahoo.com", "link_props": { "external_id": "123456", "tag_ids": [ "clux0rgak00011...", ], "test_variants": [ { "url": "https://example.com/variant-1", "percentage": 50, }, { "url": "https://example.com/variant-2", "percentage": 50, }, ], }, }, }) assert res is not None # Handle response print(res)
{ "publicToken": "<string>", "expires": "<string>" }
Referrals embed token endpoint require an Advanced plan subscription or higher.
Default authentication mechanism
The created public embed token.
The response is of type object.
object
Was this page helpful?