There are 2 ways to authorize API request, using Access Token (equivalent to password) and using OAuth

Access Token

You can connect to your store API directly using your access token, the Access Token is equivalent to your password, so you must be careful and keep it secret.

To get your access token, login to your Admin panel -> Settings -> API Access -> Generate Token

Once you get your token, you can get authorized to API server by attaching a header in your request. Example:

curl -X GET -H 'Authorization: Bearer {Your-Access-Token}' -H "Content-type: application/vnd.api+json" ''

OAuth (Hiweb Apps)

Another (and recommended) way to consume API is using "App" with OAuth authentication. Below is the flow:

  1. You create an "App" and require some permissions (scopes) that your app will comsume from API server, you can also request all webhook events that your app will listen to.

  2. Shop owner installs your app, Hiweb redirects him to the OAuth Grant Screen and requests required scopes. We assume that you already created your first app, then you can try to install your own app by going to:{YOUR-APP-ID}

  3. Shop owner decides to "Install" the app and hiweb redirects him to the app "Install URL" (you set this URL in your app setting) with a query parameter "nonce". For example:{NONCE-CODE}

  4. Next, you need to use this "nonce" code to verify the installation request and get the OAuth Token by making a GET request to:{NONCE-CODE}

  5. Hiweb API returns the OAuth Access Token with the shop detail (shop domain, shop id, shop name) and now you can use the Access Token to authorize API request.

Example of using {NONCE-CODE} to get OAuth Access Token:


Path parameters

Parameter Required Description
NONCE-CODE true You will receive the nonce code from the redirection after shop owner installed your app

Example response:

            ... scopes that shop owner granted ...
            "name":"Test shop",
            "title":"Test shop",
            "description":"Test shop"