Method for adding a user
IN THIS ARTICLE
The user creation method lets you register new users in Albato to set up and enable integrations on their behalf.
Authorization: This method should be called with the partner's master account token.
Request:
POST https://api.albato.com/wl/partner-name/add-user
Request parameters:
- id — An alphanumeric user ID that the partner passes when creating a new user. The ID must be unique for each partner's user.
- language — User interface language. Available values: en, pt, es (English, Portuguese, Spanish). The default value can be set in the partner account (default = en).
- timezoneOffset — User timezone in minutes relative to UTC. The default value can be set in the partner account.
Response parameters:
- success — Request success indicator. Available values: true or false
- data.id — The created user's ID (in Albato)
- data.email — The created user's email
- data.language — The created user's interface language
- data.timezoneOffset — The created user's timezone
- data.permanentToken — A permanent API token; returns only if permanent tokens are enabled
- data.sessionToken — A temporary API token; returns only if temporary tokens are enabled
- data.sessionTokenValidUntil — Expiration timestamp (unix); returns only if temporary tokens are enabled
- data.planId — The created user's plan ID; returns only if billing plans are enabled
- data.trxLimit — The created user's transaction limit; returns only if billing plans are enabled
Request example via curl:
curl --header "Content-type: application/json" --header "Accept: application/json" --header "Authorization: Basic cEFJjGffUSkV6WFFyWUhBM1RzS2hRHg7iKgReghUiijBfrdTY6" --request POST --data '{"id":"test", "timezoneOffset": -180}' "https://api.albato.com/wl/partner-name/add-user"
Response example:
{
"success": true,
"data": {
"id": 1357,
"email": "test@example.com",
"permanentToken": "IhIHggKkgBP-qtiDXLAMxKsSOO6A4Mu_L",
"sessionToken": "eyJ0eXAiOiJKV.eyJpZGVudGl0eSI6OTczMzAsInRydWVJZGVudGl0eS..._GT8jc8Xby-3sidRPk",
"sessionTokenValidUntil": 1654744263
}
}
Did this answer your question?