Skip to content

Commit 5b3e7c6

Browse files
authored
Merge pull request #134718 from mikben/issues-feedback
Issues feedback
2 parents a99b2a5 + db084b3 commit 5b3e7c6

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

articles/communication-services/quickstarts/includes/user-access-token-js.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ await identityClient.revokeTokens(userResponse);
123123
console.log(`\nSuccessfully revoked all tokens for user with Id: ${userResponse.communicationUserId}`);
124124
```
125125

126+
## Refresh user access tokens
127+
128+
To refresh a token, use the `CommunicationUser` object to re-issue:
129+
130+
```javascript
131+
let userResponse = new CommunicationUser(existingUserId);
132+
let tokenResponse = await identityClient.issueToken(userResponse, ["voip"]);
133+
```
134+
126135
## Delete a user
127136

128137
Deleting a user revokes all active tokens and prevents you from issuing subsequent tokens for the identities. It also removes all the persisted content associated with the user.

articles/communication-services/quickstarts/voice-video-calling/includes/get-started-javascript.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ npm install @azure/communication-common --save
4242
npm install @azure/communication-calling --save
4343
```
4444

45+
The following versions of webpack are recommended for this quickstart:
46+
47+
```console
48+
"webpack": "^4.42.0",
49+
"webpack-cli": "^3.3.11",
50+
"webpack-dev-server": "^3.10.3"
51+
```
52+
4553
The `--save` option lists the library as a dependency in your **package.json** file.
4654

4755
### Set up the app framework
@@ -92,11 +100,10 @@ import { CallClient, CallAgent } from "@azure/communication-calling";
92100
import { AzureCommunicationUserCredential } from '@azure/communication-common';
93101

94102
let call;
103+
let callAgent;
95104
const calleeInput = document.getElementById("callee-id-input");
96105
const callButton = document.getElementById("call-button");
97106
const hangUpButton = document.getElementById("hang-up-button");
98-
99-
// quickstart code goes here
100107
```
101108

102109
## Object model
@@ -115,12 +122,13 @@ The following classes and interfaces handle some of the major features of the Az
115122
You need to replace `<USER_ACCESS_TOKEN>` with a valid user access token for your resource. Refer to the [user access token](../../access-tokens.md) documentation if you don't already have a token available. Using the `CallClient`, initialize a `CallAgent` instance with a `CommunicationUserCredential` which will enable us to make and receive calls. Add the following code to **client.js**:
116123

117124
```javascript
118-
const callClient = new CallClient();
119-
const tokenCredential = new AzureCommunicationUserCredential("<USER ACCESS TOKEN>");
120-
let callAgent;
121-
122-
callAgent = await callClient.createCallAgent(tokenCredential);
123-
callButton.disabled = false;
125+
async function init() {
126+
const callClient = new CallClient();
127+
const tokenCredential = new AzureCommunicationUserCredential("<USER ACCESS TOKEN>");
128+
callAgent = await callClient.createCallAgent(tokenCredential);
129+
callButton.disabled = false;
130+
}
131+
init();
124132
```
125133

126134
## Start a call

0 commit comments

Comments
 (0)