すべてのプロダクト
Search
ドキュメントセンター

:FetchOAuthAuthenticationToken

最終更新日:Jul 30, 2026

有効な OAuth 認証トークンを取得します。

操作説明

この API は、IDaaS が発行したアクセストークンに基づいてリクエストの認証と権限付与を行います。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

この操作の認証情報はありません。問題が発生した場合は、アカウントマネージャーにご連絡ください。

リクエスト構文

POST /v2/{instanceId}/authenticationTokens/_/actions/fetchOAuthAccessToken HTTP/1.1

パスパラメータ

パラメーター

必須 / 任意

説明

instanceId

string

必須

インスタンスの ID。

idaas_ue2jvisn35ea5lmthk267xxxxx。

リクエストパラメーター

パラメーター

必須 / 任意

説明

Authorization

string

必須

認証情報。フォーマット: Bearer ${access_token}。

Bearer xxxxxx。

body

object

任意

リクエストボディ。

{'キー': '値'}

credentialProviderIdentifier

string

必須

認証情報プロバイダーの識別子。

test_example_identifier。

scope

string

任意

OAuth プロトコルに対応する範囲。

example:test_01 example:test_02

forceAuthentication

boolean

任意

既存の有効なトークンを無視して再権限付与を強制するかどうかを指定します。デフォルト値: false。

false。

customParameters

object

任意

OAuth プロバイダーがサポートする追加パラメーターを渡すために、OAuth 権限付与 URL に追加されるカスタムキーと値のペア。

string

任意

OAuth プロバイダーがサポートする追加パラメーター。

access_type=オフライン

レスポンスフィールド

フィールド

説明

object

OAuth 認証トークンの詳細。

instanceId

string

インスタンスの ID。

idaas_ue2jvisn35ea5lmthk267xxxxx。

authenticationTokenId

string

認証トークンの ID。

atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx。

credentialProviderId

string

認証情報プロバイダーの ID。

atp_01kr2cmj5gxxx4fvmls2e93dxxxxx。

createTime

integer

認証トークンの作成時間。この値はミリ秒単位の UNIX タイムスタンプです。

1649830225000

updateTime

integer

認証トークンの更新時間。この値はミリ秒単位の UNIX タイムスタンプです。

1649830225000

authenticationTokenType

string

認証トークンのタイプ。

列挙値:

  • oauth_access_token :

    oauth_access_token

oauth_access_token

revoked

boolean

認証トークンが取り消されているかどうかを示します。

false。

creatorType

string

認証トークンの作成者タイプ。

列挙値:

  • application :

    application

application

creatorId

string

認証トークンの作成者の ID。

app_ngtkgrrxxxxktg5eao6z4xxxxx。

consumerType

string

認証トークンの消費者タイプ。

列挙値:

  • application :

    application

  • custom :

    custom。

application

consumerId

string

認証トークンの消費者の ID。

app_ngtkgrrxxxxktg5eao6z4xxxxx。

expirationTime

integer

認証トークンの有効期限時間。この値はミリ秒単位の UNIX タイムスタンプです。

1772693568000

oauthAccessTokenContent

object

OAuth アクセストークンタイプの認証トークンの内容。

accessTokenValue

string

OAuth プロトコルのトークンエンドポイント応答における access_token フィールド。

DgEBAGP2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx。

tokenType

string

OAuth プロトコルのトークンエンドポイント応答における token_type フィールド。

Bearer。

scope

string

OAuth プロトコルのトークンエンドポイント応答における範囲フィールド。

example:test_01 example:test_02

oauthAuthorizationSession

object

OAuth user_federation フローの権限付与会話。初回の権限付与時またはユーザーの操作が必要な時間に返されます。

sessionId

string

権限付与会話の ID。

atpoas_01l6losojlojbbv01adsq56xxxxx。

authorizationUrl

string

ユーザー権限付与 URL。

https://login.dingtalk.com/oauth2/auth?client_id=...

sessionUri

string

権限付与会話の URI。

urn:ietf:params:oauth:request_uri:atpoas_01l6ljnvrpc5niakl3gj3amxxxxxx

sessionStatus

string

権限付与会話のステータス。

列挙値:

  • pending :

    pending。

pending。

成功レスポンス

JSONJSON

{
  "instanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx。",
  "authenticationTokenId": "atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx。",
  "credentialProviderId": "atp_01kr2cmj5gxxx4fvmls2e93dxxxxx。",
  "createTime": 1649830225000,
  "updateTime": 1649830225000,
  "authenticationTokenType": "oauth_access_token",
  "revoked": true,
  "creatorType": "application",
  "creatorId": "app_ngtkgrrxxxxktg5eao6z4xxxxx。",
  "consumerType": "application",
  "consumerId": "app_ngtkgrrxxxxktg5eao6z4xxxxx。",
  "expirationTime": 1772693568000,
  "oauthAccessTokenContent": {
    "accessTokenValue": "DgEBAGP2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx。",
    "tokenType": "Bearer。",
    "scope": "example:test_01 example:test_02"
  },
  "oauthAuthorizationSession": {
    "sessionId": "atpoas_yyy。",
    "authorizationUrl": "https://auth.example.com。",
    "sessionUri": "urn:ietf:params:oauth:request_uri:atpoas_yyy",
    "sessionStatus": "pending。"
  }
}

エラーコード

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。