From 1c1685ab3f341011f076f2645e7d92b3fdc0eb36 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Mon, 8 Jul 2024 14:54:14 +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..3fe0efd0ea6 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' \ @@ -59,6 +59,8 @@ curl --location \ --data-urlencode 'scope=all' ``` +Remember to replace the actual values with your own. +