Issue token
POSThttps://auth.agribus-connect.net/token
OAuth 2.0 のトークンエンドポイント。application/x-www-form-urlencoded で grant_type を指定する。
認可コードフロー (authorization_code) では code・redirect_uri・client_id・client_secret (PKCE の場合は code_verifier) を送る。
リフレッシュは refresh_token。
Authentication
None
Parameters
None
Request body
application/x-www-form-urlencoded *
| Name | Type | Description |
|---|---|---|
grant_type * | string | authorization_coderefresh_tokenclient_credentials |
code | string | Authorization code (authorization_code) |
redirect_uri | string | Same redirect URI as in the authorization request |
client_id | string | |
client_secret | string | |
code_verifier | string | PKCE code_verifier |
refresh_token | string | Refresh token (refresh_token) |
scope | string | Requested scopes (space-separated) |
curl example
curl -X POST 'https://auth.agribus-connect.net/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=authorization_code' \
-d 'code=<code>' \
-d 'redirect_uri=<redirect_uri>' \
-d 'client_id=<client_id>' \
-d 'client_secret=<client_secret>'Responses
200 — OK · application/json TokenResponse
{
"accessToken": "string",
"refreshToken": "string",
"accessTokenExpiredAt": "2016-01-01T00:00:00.000Z",
"refreshTokenExpiredAt": "2016-01-01T00:00:00.000Z"
}