Skip to content

Commit 3ac1ec9

Browse files
committed
update
1 parent 93cf8d3 commit 3ac1ec9

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

articles/azure-web-pubsub/howto-generate-client-access-url.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The same Client Access URL can be generated by using the Web PubSub server SDK.
2727

2828
# [JavaScript](#tab/javascript)
2929

30-
1. Follow [./reference-server-sdk-js.md#getting-started] to create a `WebPubSubServiceClient` object `service`
30+
1. Follow [Getting started with server SDK](./reference-server-sdk-js.md#getting-started) to create a `WebPubSubServiceClient` object `service`
3131

3232
2. Generate Client Access URL by calling `WebPubSubServiceClient.getClientAccessToken`:
3333
* Configure user ID
@@ -53,7 +53,7 @@ The same Client Access URL can be generated by using the Web PubSub server SDK.
5353

5454
# [C#](#tab/csharp)
5555

56-
1. Follow [./reference-server-sdk-csharp#getting-started] to create a `WebPubSubServiceClient` object `service`
56+
1. Follow [Getting started with server SDK](./reference-server-sdk-csharp#getting-started) to create a `WebPubSubServiceClient` object `service`
5757

5858
2. Generate Client Access URL by calling `WebPubSubServiceClient.GetClientAccessUri`:
5959
* Configure user ID
@@ -79,7 +79,7 @@ The same Client Access URL can be generated by using the Web PubSub server SDK.
7979

8080
# [Python](#tab/python)
8181

82-
1. Follow [./reference-server-sdk-python.md#install-the-package] to create a `WebPubSubServiceClient` object `service`
82+
1. Follow [Getting started with server SDK](./reference-server-sdk-python.md#install-the-package) to create a `WebPubSubServiceClient` object `service`
8383

8484
2. Generate Client Access URL by calling `WebPubSubServiceClient.get_client_access_token`:
8585
* Configure user ID
@@ -105,7 +105,7 @@ The same Client Access URL can be generated by using the Web PubSub server SDK.
105105

106106
# [Java](#tab/java)
107107

108-
1. Follow [./reference-server-sdk-java.md#getting-started] to create a `WebPubSubServiceClient` object `service`
108+
1. Follow [Getting started with server SDK](./reference-server-sdk-java.md#getting-started) to create a `WebPubSubServiceClient` object `service`
109109

110110
2. Generate Client Access URL by calling `WebPubSubServiceClient.getClientAccessToken`:
111111
* Configure user ID
@@ -147,19 +147,7 @@ In real-world code, we usually have a server side to host the logic generating t
147147
You can enable Azure AD in your service and use the Azure AD token to invoke [Generate Client Token rest API](/rest/api/webpubsub/dataplane/web-pub-sub/generate-client-token) to get the token for the client to use.
148148

149149
1. Follow [Authorize from application](./howto-authorize-from-application.md) to enable Azure AD.
150-
2. Get the Azure AD token with Postman:
151-
1. For the URI, enter `https://login.microsoftonline.com/<TENANT ID>/oauth2/token`. Replace `<TENANT ID>` with the **Directory (tenant) ID value** in the **Overview** tab of the application you created earlier.
152-
2. On the **Headers** tab, add **Content-Type** key and `application/x-www-form-urlencoded` for the value.
153-
3. Switch to the **Body** tab, and add the following keys and values.
154-
1. Select `x-www-form-urlencoded`.
155-
2. Add `grant_type` key, and type `client_credentials` for the value.
156-
3. Add `client_id` key, and paste the value of **Application (client) ID** in the **Overview** tab of the application you created earlier.
157-
4. Add `client_secret` key, and paste the value of client secret you noted down earlier.
158-
5. Add `resource` key, and type `https://webpubsub.azure.com` for the value.
159-
4. Select **Send** to send the request to get the token. You see the Azure AD token in the `access_token` field.
160-
161-
![The diagram shows how to get Azure AD token using postman.](./media/howto-generate-client-access-url/get-azure-ad-token-using-postman-response.png)
162-
150+
2. Follow [Get Azure AD token](./howto-authorize-from-application#use-postman-to-get-the-azure-ad-token) to get the Azure AD token with Postman.
163151
3. Use the Azure AD token to invoke `:generateToken` with Postman:
164152
1. For the URI, enter `https://{Endpoint}/api/hubs/{hub}/:generateToken?api-version=2022-11-01`
165153
2. On the **Auth** tab, select **Bearer Token** and paste the Azure AD token fetched in the previous step

0 commit comments

Comments
 (0)