Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions content/800-guides/450-management-api-api-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,42 +153,57 @@ You should receive a successful response confirming your project creation.

## Yaak

Yaak is a lightweight, native API client focused on speed and a minimal interface.
Yaak is a lightweight, open-source, and offline API client that works with Git.

### Prerequisites

Before you begin, make sure you have:
- A [Prisma Console account](https://console.prisma.io)
- [Yaak installed](https://yaak.app)

### 1. Create a service token
### 1. Create an OAuth2 Application

First, you'll need to generate a service token from Prisma Console:
First, you'll need to register an OAuth2 application in Prisma Console:

1. Navigate to [Prisma Console](https://console.prisma.io) and log in
2. Select your workspace
3. Go to **Settings → Service Tokens**
4. Click **New Service Token**
5. **Important**: Copy the generated token immediately and store it securely
2. Click the **🧩 Integrations** tab in the left sidebar
3. Under the "Published Applications" section, click **New Application**
4. Fill in your application details:
- **Name**: Yaak API Client
- **Description**: Brief description of your application *(Optional)*
- **Redirect URI**: `https://devnull.yaak.app/callback`
5. Click **Continue**
6. **Important**: Copy your Client ID and Client Secret immediately and store them securely

:::note
The redirect URI can be any valid URL. Yaak intercepts the OAuth callback regardless of the redirect URI, as long as it matches what's registered with the provider.
:::

### 2. Configure authentication in Yaak
### 2. Configure OAuth 2.0 in Yaak

Now you'll set up authentication in Yaak:

1. Open Yaak and create a new HTTP request
2. Set the request method to **POST**
3. Set the URL to `https://api.prisma.io/v1/projects`
4. Navigate to the **Headers** tab
5. Add the following headers:
4. Navigate to the **Auth** tab
5. Set the authentication type to **OAuth 2.0**
6. Enter the following values:

| Header Name | Value |
| Parameter | Value |
| --- | --- |
| Authorization | `Bearer your-service-token` |
| Content-Type | `application/json` |
| Grant Type | Authorization Code |
| Authorization URL | `https://auth.prisma.io/authorize` |
| Token URL | `https://auth.prisma.io/token` |
| Client ID | `your-client-id` |
| Client Secret | `your-client-secret` |
| Redirect URL | `https://devnull.yaak.app/callback` |
| Scope | `workspace:admin` |

:::note
Replace `your-service-token` with the service token you generated in step 1. You can use Yaak's secure variable feature by clicking the **secure** option when entering the token value.
:::
7. Click **Get Token**
8. A browser window will open and have you complete the authorization flow
9. Return to Yaak and verify that the access token has been retrieved
10. The token will be automatically attached to your requests

### 3. Make your first request

Expand All @@ -205,4 +220,4 @@ With authentication configured, you can now create a project:

3. Click **Send**

You should receive a successful response confirming your project creation.
You should receive a successful response confirming your project creation.
Loading