Skip to main content

Magic Links Functions

The payload returned will include both a web link (webLink) and a dynamic link (firebaseDynamicLinkForHyprApp).

Parameters:

  • client (HYPRHttpClient): The HYPR client object
  • request (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

basic_example.py

Get information about an existing Magic Link, identified by the token returned from Magic Link creation.

Parameters:

  • client (HYPRHttpClient): The HYPR client object
  • magic_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 an existing Magic Link, identified by the token returned from the Create a Magic Link

Parameters:

  • client (HYPRHttpClient): The HYPR client object
  • magic_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)