API

Getting Started with the API

1.7 min read

| September 14, 2024

Installing the application

Step 1: Log in to the sandbox account that you receive from Extensiv. Make sure to update the password on the first login.

Step 2: While logged into your sandbox account, click the private app URL provided in the app-created email to access your app.

Step 3: After navigating to the private app URL, click on the install icon and then accept and install.

Graphical user interface, application

Description automatically generated

Once the permissions are approved, Order Manager will generate the authorization code and a request will be made to the "post-approval redirect URL" you specified during app creation with the 'code' and 'cid' parameters appended to the URL. (If you did not specify a "post-approval redirect URL," this will be a link to the app store with the 'code' and 'cid' parameters still present.) This exact same URL will later be used to generate the access token as seen in the "Generate Access Token" section below.
 

We have provided the post-approval redirect URL in the app-created email.

 

Once the authorization code is received, follow the steps below to generate an access token.

This authorization code can be consumed only once. If an error occurs while generating the access token you will need to generate a new authorization code. To do so, simply uninstall the app from the Order Manager App Store and reinstall it; a new code will be generated.

 

Generating the Access Token

To generate an access token, the app must send a POST request to the Order Manager with 2 parameters: the authorization code and the app access key.

Authorization code: This is the code acquired by following the app install process detailed above.
App access key: This is a Base64 encoding of your appKey and appSecret (provided in the app created email).

Javascript example: window.btoa("YOUR_APP_KEY:YOUR_APP_SECRET");
Java example: java.util.Base64.getEncoder().encodeToString(new String(YOUR_APP_KEY + ":" + YOUR_APP_SECRET).getBytes());

After generating your access key, please follow these steps to request your access token:

Step 1: Create the URL for your request

  • URL Format: https://(app|demo).skubana.com/oauth/token?grant_type=authorization_code&code=<code>&redirect_uri=<redirectUri>?cid=<cid>
  • Example URL (for demo environment, use demo.skubana.com ): https://demo.skubana.com/oauth/token?grant_type=authorization_code&code= XXXX&redirect_uri=https://demo.skubana.com/appstore?cid=Z12tcGFueUlkMTIzGHV

Step 2: Make a POST request to the URL you have created with the following header:

  • Headers: Authorization: Basic YOUR_APP_ACCESS_KEY

Once the Order Manager receives the generated access token POST request, the Order Manager returns the following JSON in the response:

  • {"access_token":"<your access token>","token_type":"bearer","scope":"<the user-approved permissions>"}

Your access token should be securely stored and only used for API requests. The Order Manager will never ask you for your access token.

 

Making an API call

The base URL should https://api.demo.skubana.com or https://api.skubana.com depending on your environment.

When making calls, you need an Authorization header that includes your access token.

  • Headers: Authorization: Bearer YOUR_ACCESS_TOKEN

     

 

 

 

Not finding the help you need?

Contact Support