Skip to main content

Private app

Private apps authenticate using bearer HTTP authentication in order to use Haravan’s API resources. This guide shows you how to create a private app.

Requirements

You must be a store owner and login to admin with the owner account.

How to create a private app

There are two ways to do:

Create private apps on Haravan 's admin site.

  • Login to Haravan's admin site by owner account. Then click on "Apps" on the left menu bar and then click on the "Private app" button.

private-app-1

  • Then click to "Create new private app" button.

private-app-2

  • Fill name app and set permission for this app.

private-app-3

  • Finally, click on the Save button to complete and copy the API key to use Haravan's API resource.

private-app-4

Create private apps on Haravan 's developer site.

private-app-5

  • After sign in/sign up successful, the system will show a list of your applications, click "Create App" button to create a new application.

private-app-6

  • Screen for creating an application.
    • Name: application name.
    • Description: application description.
    • Redirect Url: application domain, the system will redirect to this URL when starting the application.

private-app-7

  • Some fields need to save in the config file to use: App Id, App Secret, Redirect Url.

private-app-8

  • Go to Private Token to create a private token.

private-app-9

  • Enter a name and select the scope for the private token.

private-app-10

  • After creating, you can get the token corresponding to the selected scope.

private-app-11

  • You can create multiple private tokens with the same or different scopes.

private-app-12

  • If you want to delete, click the red button with the trash bin icon to delete.

private-app-13

How to use private token

The private token is also used as access_token, this token can be used to query API.

Note: Only use API corresponding to the selected scope.

Ex: Use a private token to query shop information.

-  Headers : 
- Content-Type : application/json
- Authorization : Bearer + access_token(private token)

private-app-14