Auth
API auth manage
Get Server to Server Tokens
POST https://api-b2b.bigcommerce.com/api/io/auth/backendRequest
Get Server to Server Tokens.
Administrators are the only role allowed to create API tokens.
Authentication
- authToken in header
Body
object | application/json
storeHashstring
requiredYour store unique store_hash>= 1 charactersemailstring
requiredYou can use the backend user email to log into the B2B Edition APP.>= 1 characterspasswordstring
requiredYou can use the backend user password to log into the B2B Edition APP.>= 1 charactersnamestring
requiredThe token name, if you want to specify it.
example-1
{
"storeHash": "string",
"email": "string",
"password": "string",
"name": "test"
}
Response
OK
Body
object | application/json
codenumber
requireddataarray[object]
required
example-1
{
"code": 200,
"data": [
{
"name": "fullPermsToken",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InRlc3RfYjJjX29yZGVyX2ltcG9ydEBxcS5jb21tIiwic3RvcmVfaGFzaCI6ImYyb3N4ampueGoiLCJkYiI6ImRlZmF1bHQifQ.L_u_enljWoYBbPPskmYEQVHldHIaTcWMIB-SdFah850"
}
],
"meta": {
"message": "SUCCESS"
}
}
Delete Backend API Tokens
DELETE https://api-b2b.bigcommerce.com/api/io/auth/backendRequest
Delete backend API tokens.
Authentication
- authToken in header
Body
object | application/json
emailstring
>= 1 charactersThe backend user email is the credential you use to log into the B2B Edition APP, which will be used as a query parameter.
namestring
The token name, which will be used as a query parameter.idinteger
requiredToken ID
example
curl --request DELETE \
--url https://api-b2b.bigcommerce.com/api/io/auth/backend \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[]
example-1
{
"code": 200,
"data": [],
"meta": {
"message": "SUCCESS"
}
}
Get All Server to Server Tokens
GET https://api-b2b.bigcommerce.com/api/io/backend/tokensRequest
Get all Server to Server tokens
Authentication
- authToken in header
Parameters
- limit in query with default of 10 - integerPagination limit
- offset in query0 - integerPagination offset
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/io/backend/tokens \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
codeinteger
dataarray[object]
example-1
{
"code": 0,
"data": [
{
"id": 0,
"name": "string",
"email": "string",
"storeHash": "string",
"token": "string",
"eventChannel": "string"
}
],
"meta": {
"pagination": {
"totalCount": 0,
"offset": 0,
"limit": 10
},
"message": "string"
}
}
Get a Storefront API authToken
GET https://api-b2b.bigcommerce.com/api/io/auth/storefrontRequest
Get a storefront API authToken
Authentication
- authToken in header
Parameters
- jwtToken in query - stringrequiredBC JWT token
- channelId in query - stringThe BigCommerce channel ID. Do not use this parameter if you do not have an opened multi-storefront.
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/io/auth/storefront \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InRlc3RfYjJjX29yZGVyX2ltcG9ydEBxcS5jb21tIiwic3RvcmVfaGFzaCI6ImYyb3N4ampueGoiLCJkYiI6ImRlZmF1bHQifQ.L_u_enljWoYBbPPskmYEQVHldHIaTcWMIB-SdFah850"
},
"meta": {
"message": "SUCCESS"
}
}
Get Storefront authToken with Credentials
POST https://api-b2b.bigcommerce.com/api/io/auth/customersRequest
BigCommerce customer gets an authentication token
Authentication
- authToken in header
Body
object | application/json
storeHashstring
requiredYour store unique store_hash>= 1 charactersemailstring
requiredBC customer email>= 1 characterspasswordstring
requiredBC customer password>= 1 characterschannelIdnumber
requiredBigCommerce channel IDnamestring
requiredThe token name, if you want to specify it.>= 1 characters
example-1
{
"storeHash": "string",
"email": "axe@snapmail.cc",
"password": "test12345",
"channelId": 1,
"name": "test",
"beginAt": 1000,
"endAt": 1721930486
}
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 200,
"data": {
"name": "test9",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImtpZG8yNzZAc25hcG1haWwuY2MiLCJzdG9yZV9oYXNoIjoiMWk2enB4cGUzZyIsImRiIjoiZGVmYXVsdCIsIm5hbWUiOiJ0ZXN0OSIsImNoYW5uZWxfaWRzIjpbMV0sInRva2VuX3R5cGUiOjMsIm5iZiI6MTAwMCwiZXhwIjoyMDAxfQ.EiR__LVAlBVNYtFCZPWJYoPv6UfGiXtULxhK-BCQZjY"
},
"meta": {
"message": "SUCCESS"
}
}
Get a B2B Storefront Token
POST https://api-b2b.bigcommerce.com/api/io/auth/customers/storefrontRequest
Get B2B storefront token by v3 io token
Authentication
- authToken in header
Body
object | application/json
customerIdinteger
requiredBigCommerce customer IDchannelIdinteger
BigCommerce channel IDcustomerAccessTokenobject
BigCommerce Customer Access Token
Example 1
{
"customerId": 999,
"channelId": 1,
"customerAccessToken": {
"value": "sometoken",
"expires_at": "2024-12-31T00:00:00.0Z"
}
}
Response
OK
Body
object | application/json
codenumber
dataobject
Example 1
{
"code": 200,
"data": {
"token": [
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6IjEyM0AxMi5jb20iLCJiY19jdXN0b21lcl9pZCI6MzEzLCJzdG9yZV9oYXNoIjoiaW1rOHp6N2ppcCIsImRiIjoiZGVmYXVsdCIsImJjX2NoYW5uZWxfaWQiOjEsImV4cCI6MTY5MDg1NDI5Mn0.97rY-1aGDFKtLbIePR5g202AHZJ0x2kDjmyzGVGK45"
]
},
"meta": {
"message": "success"
}
}
See something you can improve? Edit this file on GitHub
Did you find what you were looking for?