Bearer Token, Basic Auth & API Key
Bearer Token
The most common auth type for modern REST APIs and JWTs.
Setup:
- Select Bearer Token from the Auth type dropdown
- Enter your token in the Token field
Rostyman automatically adds the header:
Authorization: Bearer <your-token>
You can use a variable: {{accessToken}} — useful when a pre-request script fetches a fresh token before each request.
Basic Auth
HTTP Basic Authentication encodes the username and password as Base64 and sends them in the Authorization header.
Setup:
- Select Basic Auth
- Enter Username and Password
Rostyman adds:
Authorization: Basic <base64(username:password)>
Both fields support {{variables}}.
API Key
Sends an API key either as a request header or as a query parameter.
Setup:
- Select API Key
- Enter the Key name (e.g.,
X-API-Keyorapi_key) - Enter the Value (your API key — use
{{apiKey}}variable) - Choose Add to: Header or Query Params
Example — header:
X-API-Key: sk-abc123...
Example — query param:
https://api.example.com/data?api_key=sk-abc123...