Authenticating with the Frontend API

The Shogun Frontend API authenticates using a combination of your Frontend credentials and your registered API key. In this scenario, you find your Frontend store's site ID and token, create an API key, register the API key, and then use the credentials to authenticate with the Frontend API.

Finding Your Frontend Store's Site ID

Your Frontend site ID is required for all Frontend API mutations and queries. To find your site ID:

  1. In your browser, navigate to Shogun Frontend.
  2. Log in to your store.
  3. Obtain your store's site ID from the first segment in the Frontend URL.

For example, in the URL: https://frontend.getshogun.com/f586b963-b678-uiug5-a8-662b47edfbc2/pages, the site ID is: f586b963-b678-uiug5-a8-662b47edfbc2.

Creating an Application for the Frontend API Service

In this scenario, you create an application for the Frontend API service.

  1. Log in to the Developer Portal.
  2. From your account, select the My Apps menu item from the dropdown. For example:

  1. Click on the "+ New Application" button.
  2. Complete the Create Application form. Provide a name for your application, configure the redirect URL as https://api.getshogun.com/frontend, and optionally provide a description. For example:

  1. Click on the "CREATE" button.

The application is created successfully. You now have an interface - your Frontend service application - to manage credentials for the Frontend API.

Creating Your API Key

To create your Frontend API key:

  1. Log in to the Developer Portal.
  2. From your account, select the My Apps menu item from the dropdown.
  3. From the Applications list, navigate to your application and select View>. For example:

  1. Click the '+ GENERATE CREDENTIAL' button.
    A new API key is generated in the Authentication section. For example:

  1. Once your Credential has been created, scroll down to the Services section and "Activate" the Production and Staging API envionments.

Registering Your API Key

Before you can use your API key, it must be registered with Shogun. Once your API key is registered - and Shogun has approved the registration - you can use the API key to authenticate with the Frontend API.

  1. In your browser, navigate to the Frontend Support Portal - Register an API Key.

  2. Complete the form - providing your API key and your Frontend account - and select 'Send'.
    The API key registration request is submitted successfully.

  3. In your email account, find the API Key Registration Complete email. Once you receive this registration confirmation, you can use your API key to authenticate with the Frontend API.

📘

You will not be able to use your API key until the registration is approved by Shogun. API key registration takes 1-2 business days. If your API key is not registered within 2 business days, please connect with our support team at https://frontend-support.getshogun.com.

Authenticating with the Frontend API

📘

Your API key must be registered with Shogun before you can use it to authenticate with the Frontend API. API key registration takes 1-2 business days. If your API key is not registered within 2 business days, please connect with our support team at https://frontend-support.getshogun.com.

To authenticate with the Frontend API, provide your Frontend store's site ID and your registered API key with each request. For example:

HeaderValueExample
API-KeyFrontend API keycFPyjIm1ehGH454jU47DumKPYP0vxL8
Site-IDFrontend store SiteIDf586b963-b678-uiug5-a8-662b47edfbc2

📘

Your API key does not expire by default. This policy is subject to change in the future.


What’s Next