Authentication and authorization
Was this helpful?
Was this helpful?
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
Customer's access token to be invalidated.
GET /customer/{tenant}/logout HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
Customer's refresh token generated when a customer token is requested.
GET /customer/{tenant}/refreshauthtoken HTTP/1.1
Host: api.emporix.io
Accept: */*
{
"access_token": "2yXy8H7sByl4JSWrr7GRqxiCRMUm",
"expires_in": 2591999,
"refresh_token": "iwXAFjGwboaehJar1qNOkV05phDw1god",
"refresh_token_expires_in": 86390,
"token_type": "Bearer",
"session_id": "45c9726e-77c8-4bd0-b29d-61ab56f59726"
}
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
The authorization code received from the identity provider.
The redirect URI that was used in the initial authorization request.
Required only if using PKCE (Proof Key for Code Exchange) flow.
Anonymous customer's unique session identifier.
POST /customer/{tenant}/socialLogin HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"social_access_token": "text",
"social_id_token": "text",
"refresh_token": "text",
"refresh_token_expires_in": "text",
"session_idle_time": 1,
"token_type": "text",
"access_token": "text",
"saas_token": "text",
"expires_in": "text",
"scope": "text"
}
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
Customer's email address.
john.doe@emporix.com
Customer's account password.
POST /customer/{tenant}/signup HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 675
{
"email": "example@customer.com",
"password": "password123",
"customerDetails": {
"title": "MR",
"firstName": "John",
"middleName": "",
"lastName": "Doe",
"contactEmail": "example@customer.com",
"contactPhone": "123456789",
"company": "Emporix",
"preferredLanguage": "en_US",
"preferredCurrency": "EUR",
"preferredSite": "main",
"b2b": {
"companyRegistrationId": "123-456-789"
}
},
"customerAddress": {
"contactName": "John Doe",
"companyName": "Emporix",
"street": "Platz der Republik",
"streetNumber": "1",
"streetAppendix": "",
"extraLine1": "",
"extraLine2": "",
"extraLine3": "",
"extraLine4": "",
"zipCode": "11011",
"city": "Berlin",
"country": "DE",
"state": "Berlin",
"contactPhone": "123456789",
"tags": [
"BILLING",
"SHIPPING"
]
}
}
{
"id": "13730481"
}
Your Emporix tenant's name.
Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$
Customer's email address.
Customer's account password.
POST /customer/{tenant}/login HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"email": "example@customer.com",
"password": "password123"
}
{
"access_token": "aYR3Lu3rpsQ9ODhBIR83b3txTr5K",
"saas_token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMzg2OTAwMCIsImV4cCI6MTY0MDQ0NDAzMn0.lvxFOeCOk-DWi3kqwJwR8eKal3ON2rr53e9I6Pha5rI",
"expires_in": 2591999,
"refresh_token": "94tKQ2Tsvlf9dYbmyccA7X1Rqe54B6dH",
"refresh_token_expires_in": 86399,
"token_type": "Bearer",
"session_id": "45c9726e-77c8-4bd0-b29d-61ab56f59726"
}