Authentication in Dropship
When integrating with fabric APIs, you must authenticate daily before making any API requests. Authentication establishes the necessary access to retrieve and send data.
If you encounter the error below, this means authentication hasn’t been completed.
To resolve this, you must successfully authenticate before making any further API calls.
Getting an Access Token
API clients are required to have both a client_id
and client_secret
to generate an authentication token. The following steps outline how to get your required credentials.
-
Log in to fabric Dropship.
-
In the top navigation, click Merchant Settings from the merchant dropdown. The dropdown will match your merchant name.
The Merchant Settings page is displayed.
-
Click API Clients.
The API Clients page is displayed with a list of all your active API clients.
-
Click Add API Client.
The Create API Client window is displayed.
-
In the Client Name field, enter a client name.
This name will be used to differentiate each of your API clients. You can have multiple API clients as needed.
-
Click Create Client
The API client is created and appears in the API Clients table.
-
Click the name of the API client you just created.
The Client Credentials page is displayed. On this page you can see an Authentication URL used to generate a token, your API URL, Retailer ID, and
client_id
. The Retailer ID is used in most API calls as a required path parameter. -
In the Client Secret field, click Get Client Secret.
The API Secret window is displayed with a warning message.
-
Click Show API Secret.
The API Secret is displayed, save this secret somewhere secure. This is used as the
client_secret
. You now have the credentials needed to generate an access token. -
To obtain an access token, you must authenticate using the Client Credentials grant type. The request body should be x-www-form-urlencoded as shown below.
The following JSON response is returned:
After an access token has been obtained, you can make requests to protected endpoints by including your access token in the Authorization header.