(embed_tokens)
- referrals - Create a new referrals embed token
Create a new 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={
"program_id": "<id>",
"partner": {
"name": "<value>",
"email": "Florencio98@hotmail.com",
"link_props": {
"external_id": "123456",
"tag_ids": [
"clux0rgak00011...",
],
},
},
})
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateReferralsEmbedTokenRequestBody | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.CreateReferralsEmbedTokenResponseBody
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400 | application/json |
errors.Unauthorized | 401 | application/json |
errors.Forbidden | 403 | application/json |
errors.NotFound | 404 | application/json |
errors.Conflict | 409 | application/json |
errors.InviteExpired | 410 | application/json |
errors.UnprocessableEntity | 422 | application/json |
errors.RateLimitExceeded | 429 | application/json |
errors.InternalServerError | 500 | application/json |
errors.SDKError | 4XX, 5XX | */* |