Private apps
Private apps can interact with the ShopBase API on behalf of only one particular store. These apps authenticate with ShopBase through basic HTTP authentication. The required credentials must be generated from the ShopBase admin of the store that you want to connect with your app.
On this page
Generate credentials from the ShopBase admin
Before you can authenticate a private app to ShopBase, you need to generate the required credentials from the ShopBase admin of the store that you want to connect with your application. If you don't have a ShopBase store, then you can create a development store.
After you've provisioned a development store, log in and then generate the required credentials from the development store admin:
From your ShopBase admin, go to Apps.
Click Manage private apps, near the bottom of the page.
Click Create a new private app.
In the App details section, enter a name for the private app and a contact email address.
ShopBase uses the email address to contact the developer if there is an issue with the private app, such as when an API change might break it.
In the Admin API section, select the areas of your store that you want the app to be able to access.
Click Save.
You'll see your API key and password in the Admin API section. You can use these credentials to make authenticated requests to the ShopBase store that uses your application.
Make authenticated requests
A private app can make authenticated requests to the ShopBase Admin REST API using basic authentication or by including its ShopBase access token in the request header.
Basic authentication
Private apps can authenticate through basic HTTP authentication by using their Admin API key and password as a username and password. You can generate these credentials from the ShopBase admin of the store that you want to connect with your app.
Some HTTP clients support basic authentication by prepending username:password@
to the hostname in the URL. For example:
GET https://4478eb7ac138a136852babd861956c19:[email protected]/admin/shop.json
If your HTTP client doesn't support basic authentication using this method, then you can provide the credentials in the Authorization
header field instead:
Join the API key and password with a single colon (
:
).Encode the resulting string in base64 representation.
Prepend the base64-encoded string with
Basic
and a space:Authorization: Basic NDQ3OGViN2FjMTM4YTEzNjg1MmJhYmQ4NjE5NTZjMTk6M2U1YTZlZGVjNzFlYWIwMzk0MjJjNjQ0NGQwMjY1OWQ=
Last updated
Was this helpful?