Making your first request
This guide describes the basic steps for getting started with ShopBase's API. You can create your development stores to test your apps, themes, and other integrations that you build.
Last updated
Was this helpful?
This guide describes the basic steps for getting started with ShopBase's API. You can create your development stores to test your apps, themes, and other integrations that you build.
Last updated
Was this helpful?
When you make an API call, you need to include API credentials to authenticate it. You can quickly generate API credentials by creating a private app from your development store's ShopBase admin. When you create the private app, ShopBase creates an API key and password, which you can include in API calls to the development store.
Steps:
From your ShopBase admin, go to Apps.
Click Manage private apps.
Click Create a new private app.
In the App details section, enter a name for your app, and an emergency developer email.
In the Admin API section, select the areas of your store that you want the app to access.
Click Save.
After you save the app's details, the Admin API section shows the app's API key and password.
Caution
Treat the API key and password like you would any other password since whoever has access to these credentials has full API access to the store.
You can use the API key and password that you generated for of your first request. The URL format for basic authorization is as follows:
{username}
— The API key that you generated
{password}
— The API password
{shop}
- The name that you entered for your development store
A URL with real values looks like this:
The following curl request retrieves information by using the Shop resource and the /admin/shop.json
endpoint:
Substitute your own values, and then run the curl command from the command line to retrieve information from your development store.
{resource}
— A resource endpoint from the
You can use SampleApp from this as a reference for understanding authentication flow of a ShopBase app and how to call ShopBase APIs with public app.