For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
    • Archive
    • Closed Beta Programs
        • API Documentation
        • Check List
        • Code Samples
        • Guiding Questions
        • Iterative Feature Development
        • API Reference
              • POSTCreate Store
              • GETGet Store
              • POSTCreate Store Login URL
              • GETList Stores
Dev Portal
LogoLogo
Closed Beta ProgramsPowered ByAPI ReferenceStores

Create Store Login URL

Beta
POST
https://api.bigcommerce.com/franchises/franchise_uuid/v1/stores/:store_id/login-url
POST
/franchises/franchise_uuid/v1/stores/:store_id/login-url
$curl -X POST https://api.bigcommerce.com/franchises/franchise_uuid/v1/stores/store_id/login-url \
> -H "Accept: application/json" \
> -H "X-Auth-Client: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "user_email": "hello@example.com"
>}'
1{
2 "data": {
3 "login-url": "https://login.bigcommerce.com/sso/express-logins/asdf1234/agdsa2214321rnfjdwjkflewrb318orewfij3wfcdn2/wpl8zqW95J0UafEaOySMvKVNA83%0AqVK5z1gUkXlEBSyFkOS7D7msDR8nYG0IECEtBDUhlGsKIVZWDZi0GVD6pg5+%0AbEEFvaMrhxbEgtaUUgoX1w==%0A"
4 },
5 "meta": {}
6}
`POST` `/stores/{store_id}/login-url` allows you to create a one-time login URL to redirect a merchant to their store control panel. You need to use a form to send a `POST` request and redirect the merchant’s browser to the action URL because most browsers only support `GET` requests in the address bar. ```javascript title=Sample Form Request loginForm = document.createElement("form"); loginForm.setAttribute("method", "post"); loginForm.setAttribute("action", "store login URL returned from endpoint"); document.getElementsByTagName("body")[0].appendChild(loginForm); loginForm.submit(); ``` One-time login URLs support deep linking. You can have multiple active sessions for a singular user as long each is session is created through unique login URLs. This is important you are using a single login such as customerservice@partner.com to access merchants' stores.
Was this page helpful?
Previous

Get Store

Next

List Stores

Built with

POST /stores/{store_id}/login-url allows you to create a one-time login URL to redirect a merchant to their store control panel. You need to use a form to send a POST request and redirect the merchant’s browser to the action URL because most browsers only support GET requests in the address bar.

Sample
1loginForm = document.createElement("form");
2loginForm.setAttribute("method", "post");
3loginForm.setAttribute("action", "store login URL returned from endpoint");
4document.getElementsByTagName("body")[0].appendChild(loginForm);
5loginForm.submit();

One-time login URLs support deep linking.

You can have multiple active sessions for a singular user as long each is session is created through unique login URLs. This is important you are using a single login such as customerservice@partner.com to access merchants’ stores.

Authentication

X-Auth-Clientstring
The client ID of the franchise API account.
OR
X-Auth-Tokenstring
An OAuth token generated from the franchise API account. To authenticate, generate an **OAuth Token** (if you donʼt have one or itʼs expired): ```http POST https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/oauth/token Accept: application/json X-Auth-Client: {client_id} X-Auth-Secret: {client_secret} { "duration": 900 } ``` Response: ```json { "access_token": "dlkJcn34...Lkd012", "expires_at": "2018-04-24T16:15:26.509045122Z” } ``` After you generate an **OAuth token**, use the `client_id` and `oauth_token` to authenticate all other API requests: ```http GET https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/accounts/123 Accept: application/json X-Auth-Client: {client_id} X-Auth-Token: {oauth_token} ``` Response: ```json { "data": { "id": "12345678910", "name": "Test Company", ... }, "meta": {} } ```

Path parameters

store_idstringRequired

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

user_emailstringRequired>=1 character
Email address of the requested user. Email must belong to a user that belongs to the requesting account
redirect_pathstringOptional

Note that you do not need /manage/ for your URLs. You only need the path after /manage/ that you would like the user directed to.

Response

Success
dataobject
metaobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error

An OAuth token generated from the franchise API account.

To authenticate, generate an OAuth Token (if you donʼt have one or itʼs expired):

1POST https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/oauth/token
2Accept: application/json
3X-Auth-Client: {client_id}
4X-Auth-Secret: {client_secret}
5
6{
7 "duration": 900
8}

Response:

1{
2 "access_token": "dlkJcn34...Lkd012",
3 "expires_at": "2018-04-24T16:15:26.509045122Z”
4}

After you generate an OAuth token, use the client_id and oauth_token to authenticate all other API requests:

1GET https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/accounts/123
2Accept: application/json
3X-Auth-Client: {client_id}
4X-Auth-Token: {oauth_token}

Response:

1{
2 "data": {
3 "id": "12345678910",
4 "name": "Test Company",
5 ...
6 },
7 "meta": {}
8}

The MIME type of the response body.