Skip to content

Commit

Permalink
Fix oauth examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikron committed Jun 28, 2024
1 parent 87f5160 commit 08a3e1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 4 additions & 5 deletions www/docs/learn/authentication/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,17 @@ const {
client_id: "<your client ID goes here>",
client_secret: "<your client secret goes here>",
}),
url: "<your authentication URL goes here>",
url: "https://auth.vectara.io/oauth2/token"
});
```

Here’s how you can generate a JWT token from the command line with a
cURL command:

```js title="cURL Example"
curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -d
"grant_type=client_credentials&client_id=<your client ID goes
here>&client_secret=<your client secret goes here> <your authentication
URL goes here>
curl -XPOST -H "Content-type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=<your client ID goes here>&client_secret=<your client secret goes here>" \
https://auth.vectara.io/oauth2/token
```

:::note
Expand Down
11 changes: 5 additions & 6 deletions www/versioned_docs/version-1.0/learn/authentication/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,16 @@ const {
client_id: "<your client ID goes here>",
client_secret: "<your client secret goes here>"
}),
url: "<your authentication URL goes here>"
url: "https://auth.vectara.io/oauth2/token"
});
```
Here’s how you can generate a JWT token from the command line with a
cURL command:

```js title="cURL Example"
curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -d
"grant_type=client_credentials&client_id=<your client ID goes
here>&client_secret=<your client secret goes here> <your authentication
URL goes here>
curl -XPOST -H "Content-type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=<your client ID goes here>&client_secret=<your client secret goes here>" \
https://auth.vectara.io/oauth2/token
```

:::note
Expand All @@ -157,4 +156,4 @@ use the JWT token value in the **Bearer Token** field:

![API Playground Example](/img/api_playground_listcorpora.png)

Click **Send API Request** to test the API call.
Click **Send API Request** to test the API call.

0 comments on commit 08a3e1b

Please sign in to comment.