Skip to content

Authentication B2B

User authentication and session management for B2B integrations

Operations

Authorize User

Request

When a user changes their password, their API key is regenerated. As a result, reauthorization is required using the new API key.

AttributeTypeDescription
loginstringThe user's phone number in the format +13155550175, or their email address.
passwordstringUser password
Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token

Bodyapplication/jsonrequired
loginstringrequired

Phone number or Email

Example:"testuser@alteg.io"
passwordstringrequired

Password

Example:"testpass"
curl -i -X POST \
  https://developer.alteg.io/_mock/en/b2b-v1/openapi/auth \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: string' \
  -H 'Content-Type: application/json' \
  -d '{
    "login": "testuser@alteg.io",
    "password": "testpass"
  }'

Responses

Created

Bodyapplication/json
successboolean

Request success status

Example:true
dataobject
Example:
{ "id": 123456, "user_token": "wec23fh8cDfFV4432fc352456", "name": "James Smith", "phone": "+13155550175", "login": "j.smith", "email": "j.smith@example.com", "avatar": "https://assets.alteg.io/general/0/01/123456789098765_12345678909876.png", "is_approved": true, "is_email_confirmed": false }
metaArray of any

Metadata

Example:
[]
Response
{ "success": true, "data": { "id": 123456, "user_token": "wec23fh8cDfFV4432fc352456", "name": "James Smith", "phone": "+13155550175", "login": "j.smith", "email": "j.smith@example.com", "avatar": "https://assets.alteg.io/general/0/01/123456789098765_12345678909876.png", "is_approved": true, "is_email_confirmed": false }, "meta": [] }