Authentication

Configure authentication for your API requests using Bearer tokens, Basic Auth, or API Keys.

The Auth tab lets you configure authentication for your request. Select the type from the dropdown and fill in the required fields.

Bearer Token

Used for token-based authentication. The token is sent as an Authorization: Bearer <token> header.

  1. Select Bearer Token from the Auth Type dropdown
  2. Paste your token in the input field
  3. The Authorization header is automatically added when sending
curl

curl -X GET "https://api.github.com/user" \
  -H "Authorization: Bearer ghp_xxxxxxxxxxxx"
javascript
fetch(&quot;https://api.github.com/user&quot;, {
  headers: { &quot;Authorization&quot;: &quot;Bearer ghp_xxxxxxxxxxxx&quot; }
})

Basic Auth

Used for username and password authentication. The credentials are base64-encoded and sent as an Authorization header.

  1. Select Basic Auth from the Auth Type dropdown
  2. Enter your username and password
  3. The header is automatically generated

API Key

Send a key-value pair as either a header or a query parameter.

  1. Select API Key from the Auth Type dropdown
  2. Enter the key name (e.g., X-API-Key) and its value
  3. Choose Header or Query Parameter as the location

Using Environment Variables

Store your tokens and credentials as environment variables instead of typing them directly:

  • Define a variable like token in your environment
  • Use {{token}} in the auth field
  • The value is resolved when the request is sent

This is a safer practice — credentials are stored in one place and can be switched between environments.

Learn more

On this page