Skip to main content
POST
/
v1
/
auth
/
magic_links
/
create
Create Embeddable Magic Link
curl --request POST \
  --url https://api.streambird.io/v1/auth/magic_links/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
  "expires_in": 60
}'
{
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
  "token": "kto7dNK1tnsuCT95CTLeRiJaGP3lmWN50iDIbruTrCG6BFxz"
}

Authorizations

Authorization
string
header
required

Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.

Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the public_token.

Authentication using App Api Key

Header:

Authorization: Bearer {api_key}

Authenticated Request

curl \
-X GET https://api.streambird.io/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"

Body

application/json
user_id
string
required

Given Unique ID that identifies the user.

Minimum length: 1
expires_in
number

Expiration time of the magic link in minutes. Must be between 5 to 10080 minutes (7 days).

device_fingerprint
object

Device fingerprinting metadata for fraud detection during verification step. This is useful to ensure that the user who originated the request matches the user that verifies the token. Verification requirements can be enabled in the Verify Token step by matching fields in the device_fingerprint such as IP, User Agent or the combination of them (more fraud detection features coming soon!)

Response

200 - application/json

OK

user_id
string
required
Minimum length: 1
token
string
required
Minimum length: 1