User Authentication API

User Authentication API Documentation




Generates a login session link for a specified user. This endpoint requires a Blaze Team Advanced or White Labeling subscription.

Endpoint


GET https://us-central1-querycomposer.cloudfunctions.net/user_authentication_api


Authentication


- Requires a valid API key passed as a query parameter
- Must have an active Blaze Team Advanced or White Labeling subscription

Parameters



ParameterRequiredTypeDescription
api_keyYesstringYour API authentication key
user_emailYesstringURL encoded email address of the user to generate link for


Example Request


GET https://us-central1-querycomposer.cloudfunctions.net/user_authentication_api?user_email=user%40example.com&api_key=your_api_key_here


URL Encoding


The email address must be URL encoded. Common encodings include:
- @ becomes %40
- . remains as .
- + becomes %2B
- spaces become %20

Example encodings:
- user@example.comuser%40example.com
- first.last@example.comfirst.last%40example.com
- user+label@example.comuser%2Blabel%40example.com

Responses



Success Response


- Status Code: 200
- Content: Login link for the specified user
{
    "login_link": "https://..."
}


Error Responses



Invalid Request - Missing API Key
- Status Code: 400
- Content: "Invalid request, missing API key"

Invalid API Key
- Status Code: 403
- Content: "Invalid API key"

Insufficient Subscription
- Status Code: 403
- Content: "Authentication API Require Blaze Team Advanced or White Labeling Subscription"

Missing Required Parameter
- Status Code: 400
- Content: "Invalid request, missing user_email"

User Not Found
- Status Code: 404
- Content: "User not found"

User Not in Team
- Status Code: 404
- Content: "This user is not in your team"

Server Error
- Status Code: 500
- Content: Error message string

Usage Restrictions


The API key must be associated with an account having Blaze Team Advanced or White Labeling subscription
The requested user must belong to the same team as the API key owner
The user must exist in the system

Security Notes


- API keys should be kept secure and never exposed in client-side code
- All requests should be made over HTTPS
- Each API key should only be used for a single application or service
- Ensure proper URL encoding of email addresses to prevent request errors

Updated on: 29/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!