TABLE OF CONTENTS
- 1. Step 1: Create app
- 2. Step 2: Private app configuration
- 3. Step 3: Use private app and private token
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).
- After logging in, you need to select a shop if your account has multiple shops.
- After sign in/sign up successful, the system will show a list of your applications, click "Create App" button to create a new application.
- Screen for create application.
- Name: application name.
- Description: application description.
- Redirect Url: application domain, the system will redirect to this url when starting application.
- Some field need to save in config file to use: App Id, App Secret, Redirect Url.
- After created, your application will be appeared on list https://developers.haravan.com/apps
2. Step 2: Private app configuration
- Go to Private Token, select ‘Create Private Token’ button to create a private token.
- Enter a name and select the scope for the private token
- After creating, you can get the token corresponding to the selected scope
- You can create multiple private tokens with the same or different scopes.
- If you want to delete, click the red button with the trash bin icon to delete.
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
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.
Content-Type : application/json
Authorization : Bearer + access_token(private token)