From f552e3df3f92955795a9cf1fe36298c0a53ae5e3 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Mon, 8 Jul 2024 14:48:47 +0800 Subject: [PATCH] refactor: fix curl samples --- .../_access-logto-management-api-using-access-token.mdx | 6 ++++-- .../_fetch-access-token-for-logto-management-api.mdx | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/quick-starts/generic/machine-to-machine/fragments/_access-logto-management-api-using-access-token.mdx b/docs/quick-starts/generic/machine-to-machine/fragments/_access-logto-management-api-using-access-token.mdx index 08fad6cfa0f..598577117f2 100644 --- a/docs/quick-starts/generic/machine-to-machine/fragments/_access-logto-management-api-using-access-token.mdx +++ b/docs/quick-starts/generic/machine-to-machine/fragments/_access-logto-management-api-using-access-token.mdx @@ -26,10 +26,12 @@ const fetchLogtoApplications = async () => { ```bash curl --location \ - --request GET 'https://your.logto.endpoint/api/applications' \ # Replace with your Logto endpoint - --header 'Authorization: Bearer eyJhbG...2g' # Access Token + --request GET 'https://your.logto.endpoint/api/applications' \ + --header 'Authorization: Bearer eyJhbG...2g' ``` +Remember to replace the actual values with your own. The value after `Bearer` should be the access token (JWT) you received. + diff --git a/docs/quick-starts/generic/machine-to-machine/fragments/_fetch-access-token-for-logto-management-api.mdx b/docs/quick-starts/generic/machine-to-machine/fragments/_fetch-access-token-for-logto-management-api.mdx index cace5f1d6f0..a20ba304f6b 100644 --- a/docs/quick-starts/generic/machine-to-machine/fragments/_fetch-access-token-for-logto-management-api.mdx +++ b/docs/quick-starts/generic/machine-to-machine/fragments/_fetch-access-token-for-logto-management-api.mdx @@ -51,7 +51,7 @@ const fetchAccessToken = async () => { ```bash curl --location \ - --request POST 'https://your.logto.endpoint' \ # Replace with your Logto endpoint + --request POST 'https://your.logto.endpoint' \ --header 'Authorization: Basic ${your_auth_string}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ @@ -61,6 +61,8 @@ curl --location \ +Remember to replace the actual values with your own. + :::caution