Skip to content

Commit

Permalink
refactor: fix curl samples
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Jul 8, 2024
1 parent 2a95a17 commit 1c1685a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</TabItem>

</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ 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' \
--data-urlencode 'resource=https://${tenantId}.logto.app/api' \
--data-urlencode 'scope=all'
```

Remember to replace the actual values with your own.

</TabItem>

</Tabs>
Expand Down

0 comments on commit 1c1685a

Please sign in to comment.