Communication Identity - Issue Access Token
ID の新しいトークンを発行します。
POST {endpoint}/identities/{id}/:issueAccessToken?api-version=2023-10-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
通信リソース (例: ) https://my-resource.communication.azure.com |
id
|
path | True |
string |
トークンを発行する ID の識別子。 |
api-version
|
query | True |
string |
呼び出す API のバージョン。 |
要求本文
名前 | 必須 | 型 | 説明 |
---|---|---|---|
scopes | True |
トークンにアタッチされているスコープの一覧。 |
|
expiresInMinutes |
integer |
[60,1440] 分の範囲内のトークンのカスタム有効期間 (省略可能)。 指定しない場合、既定値の 1440 分 (24 時間) が使用されます。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
エラー |
例
Issue an access token. Optionally specify a custom expiration time within the [60-1440] minutes range. In case an expiration time is not specified, the default value of 1440 minutes (24 hours) will be used.
要求のサンプル
POST https://my-resource.communication.azure.com/identities/8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081/:issueAccessToken?api-version=2023-10-01
{
"scopes": [
"chat",
"voip",
"chat.join",
"chat.join.limited",
"voip.join"
],
"expiresInMinutes": 60
}
応答のサンプル
{
"token": "token",
"expiresOn": "2023-10-10T21:39:39.3244584+00:00"
}
定義
名前 | 説明 |
---|---|
Communication |
Communication Services エラー。 |
Communication |
Communication Services エラー。 |
Communication |
アクセス トークン。 |
Communication |
|
Communication |
アクセス トークンのスコープの一覧。 |
CommunicationError
Communication Services エラー。
名前 | 型 | 説明 |
---|---|---|
code |
string |
エラー コード。 |
details |
このエラーの原因となった特定のエラーの詳細。 |
|
innererror |
内部エラー (存在する場合)。 |
|
message |
string |
エラー メッセージ。 |
target |
string |
エラーのターゲット。 |
CommunicationErrorResponse
Communication Services エラー。
名前 | 型 | 説明 |
---|---|---|
error |
Communication Services エラー。 |
CommunicationIdentityAccessToken
アクセス トークン。
名前 | 型 | 説明 |
---|---|---|
expiresOn |
string |
トークンの有効期限。 |
token |
string |
ID に対して発行されたアクセス トークン。 |
CommunicationIdentityAccessTokenRequest
名前 | 型 | 規定値 | 説明 |
---|---|---|---|
expiresInMinutes |
integer |
1440 |
[60,1440] 分の範囲内のトークンのカスタム有効期間 (省略可能)。 指定しない場合、既定値の 1440 分 (24 時間) が使用されます。 |
scopes |
トークンにアタッチされているスコープの一覧。 |
CommunicationIdentityTokenScope
アクセス トークンのスコープの一覧。
名前 | 型 | 説明 |
---|---|---|
chat |
string |
これは、チャット API へのフル アクセスに使用します。 |
chat.join |
string |
チャット スレッドを作成、削除、または更新する権限を持たないチャット API へのアクセス。 |
chat.join.limited |
string |
参加者の追加または削除を許可しない、より限定されたバージョンの chat.join。 このスコープは、ゲスト シナリオなど、トークン ベアラーが完全に信頼されていない場合に使用します。 |
voip |
string |
これは、呼び出し元 API へのフル アクセスに使用します。 |
voip.join |
string |
呼び出し元 API にアクセスしますが、新しい呼び出しを開始するための承認はありません。 |