Customer Token
Was this helpful?
Was this helpful?
Checks whether a token is valid. If the token is invalid, it returns a 401 status code. If the token is valid, it provides the token details.
Name of the tenant.
Note: Name of the tenant is always written in lowercase.
{tenant}
Customer's access token generated upon the customer token creation.
Bearer {customer_access_token}
GET /customer/{tenant}/validateauthtoken HTTP/1.1
Host: api.emporix.io
Authorization: text
Accept: */*
{
"token_type": "Bearer",
"expires_in": 2591974,
"scope": "approval.approval_read_own customermanagement.legalentity_read_own customer.customer_read_own quote.quote_read_own returns.returns_read_own iam.scope_read_own iam.user_read_own customersegment.segment_read_own iam.group_read_own order.order_readascustomer coupon.coupon_redeem customer.customerprofile_edit quote.quote_manage_own returns.returns_manage_own customer.customer_manage_own approval.approval_manage_own order.order_updateascustomer iam.assignment_delete_own customer.consent_view customer.customerprofile_view order.history_view iam.assignment_create_own customer.consent_manage tenant=test",
"sessionId": "415c340b-5996-4112-bb3b-38139a409f93",
"email": "customer@example.com",
"legalEntityId": "53ac81fd0cce8b26b36f3492"
}
Sends an authentication request and returns a refresh token.
Name of the tenant.
Note: Name of the tenant is always written in lowercase.
{tenant}
Customer's refresh token generated when the customer token is created.
{customer_refresh_token}
Identifier of the legal entity associated with the user session.
Customer's access token generated when the customer token is created.
Bearer {customer_access_token}
GET /customer/{tenant}/refreshauthtoken HTTP/1.1
Host: api.emporix.io
Authorization: text
Accept: */*
The request was successful. A refresh token is returned.
{
"token_type": "Bearer",
"access_token": "5UvjlVEsU6G1NTuitcfkNBlAzUn8",
"expires_in": 1799,
"refresh_token_expires_in": 86326,
"refresh_token": "xIMsJmuyyltCWYD7uftonNeBtSAQMldH",
"session_id": "45c9726e-77c8-4bd0-b29d-61ab56f59726"
}
Logs in a customer and sends an authentication request. Returns two customer tokens: * Customer access token. * Customer SaaS token.
Name of the tenant.
Note: Name of the tenant is always written in lowercase.
{tenant}
Anonymous customer's access token.
Bearer {anonymous_access_token}
POST /customer/{tenant}/login HTTP/1.1
Host: api.emporix.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 59
{
"email": "customer@emporix.com",
"password": "Qwurmdch673;'"
}
The request was successful. A customer token is returned.
{
"access_token": "CZXFASGEG@!@$!24fasASDF",
"saas_token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIAFAFGVZE!@£$FSDVZERTNX0.BK1_F8aRMnnNN6y2Q6TVa4x_Knj3-Qojy4QsPNkHcz8",
"expires_in": 14399,
"refresh_token": "QBeG0XJfRqElE67U4tHJAQWrtfas1VR5eg",
"refresh_token_expires_in": 86399,
"session_id": "45c9726e-77c8-4bd0-b29d-61ab56f59726"
}