Magic Links Functions
Create a Magic Link: create_magic_link()
The payload returned will include both a web link (webLink) and a dynamic link (firebaseDynamicLinkForHyprApp).
Parameters:
client
(HYPRHttpClient): The HYPR client objectrequest
(CreateMagicLinkRequest): The request object containing the required input data
Returns:
- CreateMagicLinkResponse: The response object containing the magic link and associated data
Example:
basic_example.py
https://gitlab.com/passwordless/foss/hypr-python-sdk/-/blob/main/examples/basic_example.py
Retrieve a Magic Link: get_magic_link()
Get information about an existing Magic Link, identified by the token returned from Magic Link creation.
Parameters:
client
(HYPRHttpClient): The HYPR client objectmagic_link_token
(str): token returned from create_magic_link()
Returns:
- GetMagicLinkResponse: Response object containing magic link properties
Example:
magic_link_token = "<the token value>"
result: GetMagicLinkResponse = get_magic_link(client, magic_link_token)
print(result)
print(result.web_link)
Delete a Magic Link: delete_magic_link()
Delete an existing Magic Link, identified by the token returned from the Create a Magic Link
Parameters:
client
(HYPRHttpClient): The HYPR client objectmagic_link_token
(str): token returned from create_magic_link()
Returns:
- none
Example:
magic_link_token = "<the token value>"
result: GetMagicLinkResponse = delete_magic_link(client, magic_link_token)
print(result)
print(result.web_link)