The streamGo API - Magic Link Authentication

Magic Link Authentication

The streamGo API allows you to generate magic authentication links for existing users.

A magic link enables a user to authenticate with the streamGo platform through a specially generated URL.

This can be useful when integrating streamGo with external websites, registration systems or other applications where users should be able to access an event without manually signing in.

Generate a Magic Link

GET /users/{user_id}/magic-link

Returns a magic authentication link for the specified user.

Replace {user_id} with the numeric ID of the user.

All requests require your organisation's API key.

You can find your API key in your Organisation Integrations settings.

Query Parameters

Parameter Type Description
user_id Integer User ID included in the URL path
ttl Integer Optional. Link expiry time in seconds. Defaults to 600 seconds (10 minutes)
permanent Boolean Optional. Generate a link that does not expire

Example: Generate a Standard Magic Link

curl --request GET \   
'https://events.streamgo.live/api/v1/users/4/magic-link' \   
--header 'Authorization: Bearer YOUR_API_KEY'

By default, the generated link expires after 10 minutes.

Example: Custom Expiry Time

To generate a link that expires after 30 minutes, specify ttl=1800.

curl --request GET \   
'https://events.streamgo.live/api/v1/users/4/magic-link?ttl=1800' \   
--header 'Authorization: Bearer YOUR_API_KEY'

The expiry time is provided in seconds.

Example: Permanent Magic Link

To request a link that does not expire, specify permanent=true.

curl --request GET \   
'https://events.streamgo.live/api/v1/users/4/magic-link?permanent=true' \   
--header 'Authorization: Bearer YOUR_API_KEY'

Security consideration: A permanent authentication link does not have an expiry time. Only use this option where necessary, and ensure that generated links are stored and shared securely.

Successful Response

HTTP 200 OK

{   
   "result": "success",   
   "data": {     
      "token": "be3b4e9c-6e37-49be-8391-99b77dbdcb8c",     
      "url": "https://events.streamgo.live/test-event/accounts/magic-auth/be3b4e9c-6e37-49be-8391-99b77dbdcb8c",     
      "expires": "2020-01-01 12:10:00"   
   } 
}

Response Fields

Field Description
result Indicates whether the request was successful
data.token Generated authentication token
data.url Authentication URL for the user
data.expires Expiry value returned for the generated link

The url field contains the generated magic link.

Your application can use this URL to direct the user to the streamGo platform.

Error Handling

HTTP 400 Bad Request

{   "result": "error",   "message": "Malformed or incomplete request." }

Ensure that the request uses the correct endpoint and includes a valid user ID.

Security Recommendations

Magic links provide access to a user's account and should be handled carefully.

  • Keep your organisation's API key secure and never expose it in publicly accessible client-side code.
  • Only share authentication links with their intended recipients.
  • Avoid including magic links in analytics, public logs or other systems where they could be exposed.
  • Prefer links with a limited expiry time where possible.
  • Use permanent links only when your integration specifically requires them.

Need Help?

If you need assistance implementing magic link authentication, please contact the streamGo support team.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.