◷ Reading Time: 2 minutes
Url
http://{your server address}/oauth2/token
Check Parameters for more information on parameters’ name and value.
Parameter
- Header
- Content-Type: application/x-www-form-urlencoded
- Type:
- grant_type: password
For Application Accounts
- client_id: [your client id account]
- client_secret: [your client id account’s secret (password)]
For User Accounts
- username: [your user login account]
- password: [your user logic account’s secret (password)]
Result
The Server will return any data that has an access_token for your session.
function (data) {
var token = data.access_token;
}
Example
POST http://localhost:9000/oauth2/token
grant_type=password&client_id=app1&client_secret=123456
Request
Below is the HTTP request configuration:

Response
Once the request is posted, you get the response shown below:
