Authentication
You'll need your client id, secret to get an access token which you can use to access all of our other API endpoints. Your organisation should have received these information by email or slack during initial setup, if not please get in touch via mailto:[email protected].
We recommend that you run a proof-of-concept request using curl before integrating anything into your application.
post
IDaaS authentication support under client_credentials and authorization_code, about where to find your client credentials, you'd better contact Hanchu for more details.
Required scopes
This endpoint requires the following scopes:
- : all privileges
- : all privileges
Authorizations
OAuth2clientCredentialsRequired
Token URL:
OAuth2authorizationCodeRequired
Authorization URL: Token URL:
Body
client_idstringRequiredExample:
Application id
x6A****480client_secretstringRequiredExample:
Application secret
746b14f042104******52ec801e561a9grant_typestringRequiredExample:
Grant type
client_credentialsrefresh_tokenstringOptionalExample:
Refresh token when expired (Needed when refresh)
VvnUrJoqeWQFg******wH-OBpDbb3hXr6p7WResponses
200
Authentication was successful
application/json
400
Bad Request
application/json
default
Internal error
application/json
post
/oauth/tokenPOST /portal/oauth/token HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 166
"client_id='x6A****480'&client_secret='746b14f042104******52ec801e561a9'&grant_type='client_credentials'&refresh_token='VvnUrJoqeWQFg******wH-OBpDbb3hXr6p7W'"{
"access_token": "eyJhbGciOiJIUz******InR5cCI6IkpXVCJ9",
"token_type": "bearer",
"expires_in": 3599,
"refresh_token": "text"
}Last updated