OAuth 2.0 API
To use BizMessage APIs, OAuth 2.0 API authentication must be implemented beforehand. When making OAuth 2.0 requests, the basic client information(Client ID and Client Secret) issued at the time of the contract must be passed through the Aauthorization
header.
Note
- Prior to making any calls to the BizMessage API, it is necessary to first call the OAuth 2.0 Authentication API.
- For code samples of API-specific functions, please refer to Sample Code.
Warning
The staging server is linked to Kakao’s operation server, and actual messages are sent. Therefore, please be careful not to send messages incorrectly.
Request
Request Syntax
코드예제Request Syntax of OAuth 2.0 Authentication
curl -X POST "https://{base_url}/v2/oauth/token" \
-H "accept: */*" \
-H "Authorization: Basic {clientID} {clientSecret}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials"
Method | URL |
---|---|
POST | https://{base_url}/v2/oauth/token |
Parameter | Type | Required | Class | Category | Description |
---|---|---|---|---|---|
base_url | String | Y |
Operating | General | bizmsg-web.kakaoenterprise.com |
Finance | bizmsg-bank.kakaoenterprise.com |
||||
Stock | bizmsg-stock.kakaoenterprise.com |
||||
Public institution | bizmsg-gov.kakaoenterprise.com |
||||
Staging | General | stg-user.bizmsg.kakaoenterprise.com |
|||
Finance | stg-bizmsg-bank.kakaoenterprise.com |
||||
Stock | stg-bizmsg-stock.kakaoenterprise.com |
||||
Public institution | stg-bizmsg-gov.kakaoenterprise.com |
Request Header
코드예제Request Header of OAuth 2.0 AuthenticationParameter | Type | Required | Description |
---|---|---|---|
accept | MIME | Y |
*/* |
Authorization | String | Y |
Basic client information - {clientId} : Client ID issued upon contract - {clientSecret} : Client Secret issued upon contract |
Content-Type | String | Y |
application/x-www-form-urlencoded - Indicates the data type currently being transmitted |
Request Elements
코드예제Request Elements of OAuth 2.0 AuthenticationProperty | Type | Required | Description |
---|---|---|---|
grant_type | String | Y |
OAuth 2.0 Authentication - client_credentials |
Responses
Response Syntax
코드예제Response Syntax of OAuth 2.0 Authentication
{
"code": "200",
"result": {
"detail_code": "NRM00000",
"detail_message": "success"
},
"access_token": "example-token",
"token_type": "bearer",
"expires_in": 863999
}
Response Elements
코드예제Response Elements of OAuth 2.0 AuthenticationField | Type | Required | Description |
---|---|---|---|
code | String | Y |
Message delivery result code |
200 (OK): Success |
|||
201 (Created): Token created |
|||
401 (Unauthorized): Invalid authentification permission |
|||
403 (Forbidden): The request has been refused. |
|||
404 (Not Found): The requested resource(pages) couldn’t be found. |
|||
Object | Y |
Result detaisl(For reference) | |
detail_code | String | Y |
Result code details(For reference) |
detail_message | String | Y |
Result message details(For reference) |
access_token | String | Y |
Access token - URL to acquire token: /v2/oauth/token |
token_type | String | Y |
Token type - bearer |
expires_in | Integer | Y |
Token validity priod(unit: sec.) - int32 |