Authenticate using a Magic Link

The magic link is a passwordless sign-up and login option that sends a unique link to your email inbox, which you can use to get into your third-party application.

Use the generateMagicLink mutation to generate this link to be later used to send to a user's email.

Take into consideration that the link will last 24 hours only. Afterward, the link will no longer be valid.

Requirements

In order to have the magic link generated, third-party users must have the following information in their databases:

  • firebase_deep_link

  • android_package_name or

  • ios_bundle_id

Required Arguments

Argument

Type

Description

email

email

Use this as reference only.

Available Fields

Argument

Type

Description

success

Boolean

True if the magic link has been generated successfully. Otherwise it returns False

message

String

Description of the result

magicLink

String

Link which will be used to send an email.

Example

The following example returns a magic link based on a user's email provided in the query variable.

mutation($email: String!) {
  generateMagicLink(email: $email) {
    success
    message
    magicLink
  }
}
{
  "email": "user@company.com"
}

POST https://production.suggestic.com/api/v1/auth/send-magic-link

Use this REST method to request a magic link email.

Headers

NameTypeDescription

Content-Type*

String

application/json

Suggestic-Partner

String

Request Body

NameTypeDescription

email*

String

User email.

client_id*

String

curl --location --request POST 'https://production.suggestic.com/api/v1/auth/send-magic-link' \
--header 'Suggestic-Partner: suggestic' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "user@suggestic.com",
    "client_id": "6541f95a-18ce-4e10-abf8-b0dao799650b"
}'

Last updated