API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
Authentication API Reference | Streambird logo

Topics

  • Introduction
  • Authentication

Endpoints

  • Users
    • Create User POST
    • Search Users (beta) POST
    • Get User GET
    • Update User PUT
    • Delete User DELETE
    • Delete User Email DELETE
    • Delete User Phone Number DELETE
    • Delete User Wallet DELETE
    • Delete User WebAuthn Credential DELETE
    • Delete User TOTP DELETE
  • Magic Links
    • Login or Create User by Magic Link POST
    • Invite User by Magic Link POST
    • Create Embeddable Magic Link POST
    • GetMagicLinkLoginStatus POST
    • Verify Token POST
  • OTPs
    • Login or Create User by SMS POST
    • Create SMS OTP POST
    • Login or Create User by Email OTP POST
    • Create Email OTP POST
    • Verify OTP (One-time passcode) POST
  • OAuth
    • Google GET
    • Apple GET
    • Microsoft GET
    • Discord GET
    • Github GET
    • Verify Token POST
  • Wallets Login
    • Begin Wallet Registration POST
    • Get Wallet Registration Nonce POST
    • Verify Wallet (beta) POST
    • Verify Siwe Wallet Registration POST
  • Managed Wallets
    • Create Wallet (beta) POST
    • Wallet Sign Transaction (beta) POST
    • Wallet Sign Message (beta) POST
    • Get Wallet Balance (beta) POST
    • Get Wallet (beta) GET
    • List Wallet (beta) GET
  • Sessions
    • GetJWKs GET
    • GetJWKsByApp GET
    • List Sessions GET
    • Verify Session POST
    • Delete Session DELETE
  • TOTP (Time-based one-time passcode)
    • Create TOTP (beta) POST
    • Verify TOTP (beta) POST
    • Get TOTP Recovery Codes (beta) POST
    • TOTP Recovery (beta) POST
  • Passwords
    • Update Password by Session (Enterprise) POST
    • Verify Password (Enterprise) POST
    • PasswordStrengthCheck (Enterprise) POST
  • Transfers
    • Create Transfer (beta) POST
    • Confirm Transfer (beta) POST
    • Get Transfer (beta) GET
    • List Transfer (beta) GET
  • WebAuthn
    • Initiate WebAuthn Registration (beta) POST
    • Create WebAuthn Registration (beta) POST
    • Initiate WebAuthn Authentication (beta) POST
    • Verify WebAuthn Authentication (beta) POST
Powered by Bump.sh
API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
Authentication API Reference | Streambird logo

Create Embeddable Magic Link

POST /v1/auth/magic_links/create
Authorization

Create an embeddable token for Magic Link for a specific user. The token can be used with a custom email or any other methods of delivery to your user.

HTTP Request

POST /v1/auth/magic_links/create

Returns

A successful response returns an object with user_id, email_id, and token properties.

application/json

Body

  • user_id string

    Required if email not present. Given Unique ID that identifies the user.

    Minimum length is 1.

  • email string

    Required if user_id not present. Email that uniquely identifies the user.

    Minimum length is 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!)

    Hide device_fingerprint attributes Show device_fingerprint attributes object
    • ip string

      IP of the user originating the request.

    • user_agent string

      User Agent of the browser originating the request.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • user_id string Required

      Minimum length is 1.

    • token string Required

      Minimum length is 1.

    • email_id string

      Unique Email ID of the email associated with the magic link.

    • request_origin_token string

      Request origin token can be used to retrieve login status and retrieve wallets data once the magic_link has been clicked and sent back to the VerifyMagicLink endpoint for verification.

POST /v1/auth/magic_links/create
curl \
 --request POST 'https://api.streambird.io/v1/auth/magic_links/create' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"user_id":"user_24wFP9pDa9YiMJLun94iKykoZs2","expires_in":60}'
Request examples
Create embeddable magic link req
  • Create embeddable magic link req
  • Create embeddable magic link with email req
{
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
  "expires_in": 60
}
{
  "email": "sandbox@streambird.io"
}
Response examples (200)
{
  "token": "kto7dNK1tnsuCT95CTLeRiJaGP3lmWN50iDIbruTrCG6BFxz",
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
  "email_id": "email_5CTLeRiJaGP3lmWN50iDI50br",
  "request_origin_token": "8c5OHSgWbe76y8kp8g07qhuf1dcSZJ4zbC1ooFFZw4dJL3ZkXQdTvZIpJ6xbrHGjYMQchKgfNEfVp3ZbEDoELFtpcbsVLbKoLk5xSNIV4A1herVkbJyx2k73Uwmz8mz0"
}