CREATE A PRIVATE APP

Docs version 2

- Private app is an application that can only be used by the creator's account.

1. Step 1: Create app

- Follow the link https://developers.haravan.com/apps
(If you haven’t logged in, the system will redirect to sign in https://accounts.haravan.com, and at this page you can sign in or sign up).

Create app

-After logging in, you need to select a shop if your account has multiple shops

Tạo private app

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

Create app

- Screen for create application.

Create app

  • Name: application name.
  • Description: application description.
  • Redirect Url: application domain, the system will redirect to this url when starting application.

- Create success.

+ Some field need to save in config file to use: App Id, App Secret, Redirect Url.

Tạo private app

- After created, your application will be appeared on list https://developers.haravan.com/apps

Tạo private app

2. Step 2: Private app configuration

- Go to Private Token, select ‘Create Private Token’ button to create a private token.

Private app configuration

- Enter a name and select the scope for the private token

Private app configuration

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

Private app configuration

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

Private app configuration

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

Private app configuration

3. Step 3: Use private app and private token

- After creating private token, private app will be installed into the shop you selected when you logged in (step 1)

- Private app will use the selected scope when creating private token

Use private app and private token

- 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 private token to query shop information.

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

Use private app and private token