Communication Identity - Issue Access Token
ID에 대한 새 토큰을 발급합니다.
POST {endpoint}/identities/{id}/:issueAccessToken?api-version=2023-10-01
URI 매개 변수
Name | In(다음 안에) | 필수 | 형식 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
|
id
|
path | True |
string |
토큰을 발급할 ID의 식별자입니다. |
api-version
|
query | True |
string |
호출할 API의 버전입니다. |
요청 본문
Name | 필수 | 형식 | Description |
---|---|---|---|
scopes | True |
토큰에 연결된 범위 목록입니다. |
|
expiresInMinutes |
integer |
[60,1440] 분 범위 내에서 토큰의 선택적 사용자 지정 유효 기간입니다. 제공되지 않으면 기본값인 1440분(24시간)이 사용됩니다. |
응답
Name | 형식 | Description |
---|---|---|
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"
}
정의
Name | Description |
---|---|
Communication |
Communication Services 오류입니다. |
Communication |
Communication Services 오류입니다. |
Communication |
액세스 토큰입니다. |
Communication |
|
Communication |
액세스 토큰에 대한 범위 목록입니다. |
CommunicationError
Communication Services 오류입니다.
Name | 형식 | Description |
---|---|---|
code |
string |
오류 코드입니다. |
details |
이 오류로 이어진 특정 오류에 대한 자세한 내용입니다. |
|
innererror |
내부 오류(있는 경우)입니다. |
|
message |
string |
오류 메시지입니다. |
target |
string |
오류 대상입니다. |
CommunicationErrorResponse
Communication Services 오류입니다.
Name | 형식 | Description |
---|---|---|
error |
Communication Services 오류입니다. |
CommunicationIdentityAccessToken
액세스 토큰입니다.
Name | 형식 | Description |
---|---|---|
expiresOn |
string |
토큰의 만료 시간입니다. |
token |
string |
ID에 대해 발급된 액세스 토큰입니다. |
CommunicationIdentityAccessTokenRequest
Name | 형식 | Default value | Description |
---|---|---|---|
expiresInMinutes |
integer |
1440 |
[60,1440] 분 범위 내에서 토큰의 선택적 사용자 지정 유효 기간입니다. 제공되지 않으면 기본값인 1440분(24시간)이 사용됩니다. |
scopes |
토큰에 연결된 범위 목록입니다. |
CommunicationIdentityTokenScope
액세스 토큰에 대한 범위 목록입니다.
Name | 형식 | Description |
---|---|---|
chat |
string |
채팅 API에 대한 모든 액세스에 이 기능을 사용합니다. |
chat.join |
string |
채팅 API에 액세스하지만 채팅 스레드를 만들거나 삭제하거나 업데이트할 수 있는 권한은 없습니다. |
chat.join.limited |
string |
참가자를 추가하거나 제거할 수 없는 더 제한된 버전의 chat.join입니다. 예를 들어 게스트 시나리오에서 토큰 전달자를 완전히 신뢰할 수 없는 경우 이 scope 사용합니다. |
voip |
string |
호출 API에 대한 모든 액세스에 이 기능을 사용합니다. |
voip.join |
string |
호출 API에 액세스하지만 새 호출을 시작할 수 있는 권한은 없습니다. |