How to Use Basic Auth in Postman: Simple Steps
To use
Basic Auth in Postman, open the Authorization tab in your request, select Basic Auth from the Type dropdown, then enter your Username and Password. Postman will automatically add the correct Authorization header with the encoded credentials when you send the request.Syntax
Basic Auth requires a username and password to be sent in the HTTP header. Postman handles this by encoding the credentials in base64 and adding them to the Authorization header in this format:
Authorization: Basic base64(username:password)
In Postman, you just need to provide the username and password, and it creates this header for you.
http
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Example
This example shows how to set Basic Auth in Postman for a GET request to a protected API endpoint.
http
GET https://api.example.com/protected/resource
Authorization: Basic dXNlcjEyMzpwYXNzNDU2Output
HTTP/1.1 200 OK
{
"data": "Protected resource content"
}
Common Pitfalls
- Not selecting
Basic Authin the Authorization tab and manually adding the header incorrectly. - Entering wrong username or password causing authentication failure.
- Forgetting to save the request after setting credentials.
- Using Basic Auth over unsecured HTTP instead of HTTPS, risking credential exposure.
http
Wrong way: Authorization: Basic username:password Right way (Postman handles encoding): Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Quick Reference
| Step | Action |
|---|---|
| 1 | Open Postman and create a new request |
| 2 | Go to the Authorization tab |
| 3 | Select 'Basic Auth' from the Type dropdown |
| 4 | Enter your Username and Password |
| 5 | Send the request; Postman adds the Authorization header automatically |
Key Takeaways
Select 'Basic Auth' in Postman's Authorization tab to set credentials easily.
Postman encodes username and password automatically into the Authorization header.
Always use HTTPS to protect your credentials when using Basic Auth.
Avoid manually typing the Authorization header to prevent encoding errors.
Check your username and password carefully to avoid authentication failures.