OAuth 2.0 / OpenID Connect

トークン発行

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。

認証

なし

パラメータ

なし

リクエストボディ

application/x-www-form-urlencoded *

名前型説明
grant_type *string
authorization_coderefresh_tokenclient_credentials
codestring認可コード (authorization_code)
redirect_uristring認可リクエストと同じリダイレクト URI
client_idstring
client_secretstring
code_verifierstringPKCE の code_verifier
refresh_tokenstringリフレッシュトークン (refresh_token)
scopestring要求スコープ (スペース区切り)

curl の例

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>'

レスポンス

200 — OK · application/json TokenResponse

{
  "accessToken": "string",
  "refreshToken": "string",
  "accessTokenExpiredAt": "2016-01-01T00:00:00.000Z",
  "refreshTokenExpiredAt": "2016-01-01T00:00:00.000Z"
}

2026-10-27 時点の本番サーバーの OpenAPI から生成