GetMagicLinkLoginStatus

POST /v1/auth/magic_links/email/login_status

Use the request_id returned to the Client during the LoginOrCreate step. This endpoints verifies that the user has Verified the Magic Token sent to their email with Streambird and using the request_origin_token returned in the magic link initiation step. If the MagicLink has been verified, it will return the user info and related wallet info.

This step is useful for a polling flow without redirect where the UI waits until the link is verified and retrieves the session_token via the request_origin_token

HTTP Request

POST /v1/auth/magic_links/email/login_status

Returns

A successful response returns a session_token and session_jwt properties that can be used with session API.

application/json

Body

  • email_id string

    The email_id returned by the initiation step in the magic link flow.

  • One time request_origin_token returned by the initiation step in the magic link flow.

Responses

POST /v1/auth/magic_links/email/login_status
curl \
 -X POST https://api.streambird.io/v1/auth/magic_links/email/login_status \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"email_id":"email_26l7dYo0JPFLGmWNv1vNwcYh0FF","request_origin_token":"8c5OHSgWbe76y8kp8g07qhuf1dcSZJ4zbC1ooFFZw4dJL3ZkXQdTvZIpJ6xbrHGjYMQchKgfNEfVp3ZbEDoELFtpcbsVLbKoLk5xSNIV4A1herVkbJyx2k73Uwmz8mz0"}'
Request example
{
  "email_id": "email_26l7dYo0JPFLGmWNv1vNwcYh0FF",
  "request_origin_token": "8c5OHSgWbe76y8kp8g07qhuf1dcSZJ4zbC1ooFFZw4dJL3ZkXQdTvZIpJ6xbrHGjYMQchKgfNEfVp3ZbEDoELFtpcbsVLbKoLk5xSNIV4A1herVkbJyx2k73Uwmz8mz0"
}
Response examples (200)
{
  "user_id": "user_26AjWlecrLfk1Q7jBCT91cmGTQn",
  "status": "active",
  "session_token": "ic3QBkIVWWl5hsrGmJMZAllytMdrMJ3GEc9PbivIii8RZHDCwsg6lX4qpGtngw5F",
  "session_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3a18yN0Q1dU9UaFIyZHNncmFYN1dWb0VMRzRxRVgiLCJ0eXAiOiJKV1QifQ.eyJleHAiOjE2NTAwNDk0NzEsImlhdCI6MTY1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jQSTfWTk5-4nGz01Zrwmlj7kuvM9d20Ha8_DeG9UALCKz9MUq6iQ7J6JOre4NpdpSXVlQXnqsp62vnpDEMgWqlIlpodYAYLo4ACecgp3mlt92FlLGURk_5EgYqcJlidcCt3uOkfHLsLsR1vtVoqKZuHn9NpDaH3u4xvsIyqZWgKGAHyqE6gF2HhaPU63wLHloKGThm0uL6xibeL62vbP1zgSHvMg"
}
Response examples (400)
{
  "status_code": 400,
  "error_message": "Invalid magic link format, magic link missing or invalid.",
  "error_type": "invalid_magic_token"
}