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, and Spanish). The default language value can be set in the partner account (default value = en).
timezoneOffset — The user's timezone is defined in minutes relative to UTC. The default time zone 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 time zone
data.permanentToken — A permanent API token for the created user; it only returns a value if permanent tokens are enabled in the partner account settings
data.sessionToken — A temporary API token for the created user; it only returns a value if temporary tokens are enabled in the partner account settings
data.sessionTokenValidUntil — The API token expiration period (unix timestamp) for the created user; it only returns a value if temporary tokens are enabled in the partner account settings
data.planId — The created user's plan ID; it only returns a value if there are user billing plans set by the partner
data.trxLimit — The created user's transaction limit; it only returns a value if there are user billing plans set by the partner
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
}
}