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:
- In your browser, navigate to Shogun Frontend.
- Log in to your store.
- 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.
- Log in to the Developer Portal.
- From your account, select the
My Apps
menu item from the dropdown. For example:
- Click on the "+ New Application" button.
- Complete the
Create Application
form. Provide a name for your application, configure the redirect URL ashttps://api.getshogun.com/frontend
, and optionally provide a description. For example:
- 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:
- Log in to the Developer Portal.
- From your account, select the
My Apps
menu item from the dropdown. - From the Applications list, navigate to your application and select
View>
. For example:
- Click the '+ GENERATE CREDENTIAL' button.
A new API key is generated in the Authentication section. For example:
- 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.
-
In your browser, navigate to the Frontend Support Portal - Register an API Key.
-
Complete the form - providing your API key and your Frontend account - and select 'Send'.
The API key registration request is submitted successfully. -
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:
Header | Value | Example |
---|---|---|
API-Key | Frontend API key | cFPyjIm1ehGH454jU47DumKPYP0vxL8 |
Site-ID | Frontend store SiteID | f586b963-b678-uiug5-a8-662b47edfbc2 |
Your API key does not expire by default. This policy is subject to change in the future.
Updated 11 months ago