---
title: Basic Authentication for REST APIs
description: Understand Basic Authentication for REST APIs, its strengths, weaknesses, and how to implement it securely.
image: https://assets.seobotai.com/cdn-cgi/image/quality=75,w=1536,h=1024/dreamfactory.com/67d8c6aebeb3268b1c6ada90-1742266681941.jpg
---

[![DreamFactory logo](https://cdn.prod.website-files.com/64ed8da8a866be7a702fbae0/68d51994d3678214b54acb60_dreamfactory-navbar-logo.svg)](https://www.dreamfactory.com/)

 Products & Services

[AI Data Gateway](https://www.dreamfactory.com/ai-data-gateway/overview)

[Overview Why DreamFactory exists](https://www.dreamfactory.com/ai-data-gateway/overview) [Data Gov, Comp, Security Policy enforcement at the API layer](https://www.dreamfactory.com/ai-data-gateway/ai-data-governance) [Standard API Layer One contract for every backend](https://www.dreamfactory.com/ai-data-gateway/standard-api-layer) [API Gateway Functionality Routing, auth, rate limits, observability](https://www.dreamfactory.com/ai-data-gateway/api-gateway-functionality) [Deployment & Integration Self-hosted, cloud, hybrid](https://www.dreamfactory.com/ai-data-gateway/on-premise-deployment-and-integration) [Developer Productivity Auto-generated, never hand-coded](https://www.dreamfactory.com/ai-data-gateway/ai-development-accelerated) [AI App Architectures Patterns for RAG, agents, MCP](https://www.dreamfactory.com/ai-data-gateway/enterprise-ai-architectures)

AI Data Models

[AIOpenAI](https://www.dreamfactory.com/use-cases/openai) [GGoogle Gemini](https://www.dreamfactory.com/use-cases/google-gemini) [CAnthropic Claude](https://www.dreamfactory.com/use-cases/anthropic-claude-landing) [LMeta Llama](https://www.dreamfactory.com/use-cases/meta-llama) [MMistral AI](https://www.dreamfactory.com/use-cases/mistral) [CoCohere](https://www.dreamfactory.com/use-cases/cohere)

Services and support

[Quickstart Service Packages Expert-led Quickstarts to production](https://www.dreamfactory.com/services-and-support/quickstart-services-packages)

API Management

[Generate & Manage REST APIs From any database, in seconds](https://www.dreamfactory.com/api-management/generate-rest-apis) [Features Security, scripting, self-hosted & more](https://www.dreamfactory.com/api-management/features) [API Generation The complete guide to auto-generated APIs](https://blog.dreamfactory.com/a-complete-guide-to-api-generation) [API Management Concepts, tools, and best practises](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools?_gl=1*jl0njh*_gcl_au*MjQzMjgwMTc3LjE3ODIzMjI3MzY)

 Use Cases

AI Use Cases

[AI Data Access Secure, governed reads for your LLMs](https://www.dreamfactory.com/use-cases/ai-data-access) [MCP Server Drop-in Model Context Protocol](https://www.dreamfactory.com/use-cases/mcp-server) [Legacy Modernization Wrap mainframes with REST](https://www.dreamfactory.com/use-cases/legacy-modernization) [Data Governance Audit every call, enforce every policy](https://www.dreamfactory.com/use-cases/data-governance)

[Customer Case Studies](https://www.dreamfactory.com/case-studies)

[Energy Modernization](https://www.dreamfactory.com/case-studies/energy-snowflake-modernization) [Government Modernization](https://www.dreamfactory.com/case-studies/government-mainframe-oracle-modernization) [Government Business Intelligence](https://www.dreamfactory.com/case-studies/government-sql-server-bi-analyst-queries) [Manufacturing Modernization](https://www.dreamfactory.com/case-studies/steel-manufacturing-sap-erp-modernization) [Financial Services Investor Portal](https://www.dreamfactory.com/case-studies/financial-services-sql-server-investor-portal) [Non-Profit Partner Data Sharing](https://www.dreamfactory.com/case-studies/non-profit-sql-server-partner-data-sharing) [Professional Services Exec Dashboards](https://www.dreamfactory.com/case-studies/professional-services-erp-dashboards) [Education HR and External Data Sharing](https://www.dreamfactory.com/case-studies/education-student-hr-sql-server-mysql-external-data-sharing)

 Industries

Industries

#### [Healthcare HIPAA-grade APIs across EHR, claims, and labs.](https://www.dreamfactory.com/use-cases/healthcare)

#### [Financial Services Portfolios, partners, and portals on one layer.](https://www.dreamfactory.com/use-cases/financial-services)

#### [Government Modernize mainframes without re-platforming.](https://www.dreamfactory.com/use-cases/government)

#### [Manufacturing SAP, MES, and shop-floor data, governed.](https://www.dreamfactory.com/use-cases/manufacturing)

#### [Spotlight How enterprises run on DreamFactory From healthcare to energy to finance — governance baked into every endpoint. Browse case studies →](https://www.dreamfactory.com/case-studies)

 Connectors

SQL Database

[SQL SQL Server](https://www.dreamfactory.com/connectors/sql-server) [OR Oracle](https://www.dreamfactory.com/connectors/oracle) [PG PostgreSQL](https://www.dreamfactory.com/connectors/postgresql) [My MySQL](https://www.dreamfactory.com/connectors/mysql)

NoSQL & Docs

[Dy DynamoDB](https://www.dreamfactory.com/connectors/dynamodb) [Do DocumentDB](https://www.dreamfactory.com/connectors/azure-documentdb) [Mo MongoDB](https://www.dreamfactory.com/connectors/mongodb) [Cb CouchDB](https://www.dreamfactory.com/connectors/couch-db)

Cloud Warehouses

[S3 S3](https://www.dreamfactory.com/connectors/amazon-s3) [Ab Azureblob](https://www.dreamfactory.com/connectors/azure-blob) [FS FTP/SFTP](https://www.dreamfactory.com/connectors/ftp-sftp) [LS Local Storage](https://www.dreamfactory.com/connectors/local-storage)

C & SaaS

[Sf Salesforce](https://www.dreamfactory.com/connectors/salesforce) [API REST / SOAP](https://www.dreamfactory.com/connectors/soap-to-rest)

[See all 30+ connectors](https://www.dreamfactory.com/connectors)

[Blog](https://blog.dreamfactory.com/)

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

[![DreamFactory logo](https://cdn.prod.website-files.com/64ed8da8a866be7a702fbae0/68d51994d3678214b54acb60_dreamfactory-navbar-logo.svg)](https://www.dreamfactory.com/)

![hamburger](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/menu-hamburger.svg) ![close](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/close-menu.svg)

 Back to main menu

 Products & Services

 Use Cases

 Industries

 Connectors

[Blog](https://blog.dreamfactory.com/)

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

[AI Data Gateway](https://www.dreamfactory.com/ai-data-gateway/overview)

[Overview Why DreamFactory exists](https://www.dreamfactory.com/ai-data-gateway/overview) [Data Gov, Comp, Security Policy enforcement at the API layer](https://www.dreamfactory.com/ai-data-gateway/ai-data-governance) [Standard API Layer One contract for every backend](https://www.dreamfactory.com/ai-data-gateway/standard-api-layer) [API Gateway Functionality Routing, auth, rate limits, observability](https://www.dreamfactory.com/ai-data-gateway/api-gateway-functionality) [Deployment & Integration Self-hosted, cloud, hybrid](https://www.dreamfactory.com/ai-data-gateway/on-premise-deployment-and-integration) [Developer Productivity Auto-generated, never hand-coded](https://www.dreamfactory.com/ai-data-gateway/ai-development-accelerated) [AI App Architectures Patterns for RAG, agents, MCP](https://www.dreamfactory.com/ai-data-gateway/enterprise-ai-architectures)

AI Data Models

[AIOpenAI](https://www.dreamfactory.com/use-cases/openai) [GGoogle Gemini](https://www.dreamfactory.com/use-cases/google-gemini) [CAnthropic Claude](https://www.dreamfactory.com/use-cases/anthropic-claude-landing) [LMeta Llama](https://www.dreamfactory.com/use-cases/meta-llama) [MMistral AI](https://www.dreamfactory.com/use-cases/mistral) [CoCohere](https://www.dreamfactory.com/use-cases/cohere)

Services and support

[Quickstart Service Packages Expert-led Quickstarts to production](https://www.dreamfactory.com/services-and-support/quickstart-services-packages)

AI Data Models

[Generate & Manage REST APIs From any database, in seconds](https://www.dreamfactory.com/api-management/generate-rest-apis) [Features Security, scripting, self-hosted & more](https://www.dreamfactory.com/api-management/features) [API Generation The complete guide to auto-generated APIs](https://blog.dreamfactory.com/a-complete-guide-to-api-generation) [API Management Concepts, tools, and best practises](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools?_gl=1*jl0njh*_gcl_au*MjQzMjgwMTc3LjE3ODIzMjI3MzY)

AI Use Cases

[AI Data Access Secure, governed reads for your LLMs](https://www.dreamfactory.com/use-cases/ai-data-access) [MCP Server Drop-in Model Context Protocol](https://www.dreamfactory.com/use-cases/mcp-server) [Legacy Modernization Wrap mainframes with REST](https://www.dreamfactory.com/use-cases/legacy-modernization) [Data Governance Audit every call, enforce every policy](https://www.dreamfactory.com/use-cases/data-governance)

[Customer Case Studies](https://www.dreamfactory.com/case-studies)

[Energy Modernization](https://www.dreamfactory.com/case-studies/energy-snowflake-modernization) [Government Modernization](https://www.dreamfactory.com/case-studies/government-mainframe-oracle-modernization) [Government Business Intelligence](https://www.dreamfactory.com/case-studies/government-sql-server-bi-analyst-queries) [Manufacturing Modernization](https://www.dreamfactory.com/case-studies/steel-manufacturing-sap-erp-modernization) [Financial Services Investor Portal](https://www.dreamfactory.com/case-studies/financial-services-sql-server-investor-portal) [Non-Profit Partner Data Sharing](https://www.dreamfactory.com/case-studies/non-profit-sql-server-partner-data-sharing) [Professional Services Exec Dashboards](https://www.dreamfactory.com/case-studies/professional-services-erp-dashboards) [Education HR and External Data Sharing](https://www.dreamfactory.com/case-studies/education-student-hr-sql-server-mysql-external-data-sharing)

Industries

#### [Healthcare HIPAA-grade APIs across EHR, claims, and labs.](https://www.dreamfactory.com/use-cases/healthcare)

#### [Financial Services Portfolios, partners, and portals on one layer.](https://www.dreamfactory.com/use-cases/financial-services)

#### [Government Modernize mainframes without re-platforming.](https://www.dreamfactory.com/use-cases/government)

#### [Manufacturing SAP, MES, and shop-floor data, governed.](https://www.dreamfactory.com/use-cases/manufacturing)

SQL Database

[SQL SQL Server](https://www.dreamfactory.com/connectors/sql-server) [OR Oracle](https://www.dreamfactory.com/connectors/oracle) [PG PostgreSQL](https://www.dreamfactory.com/connectors/postgresql) [My MySQL](https://www.dreamfactory.com/connectors/mysql)

NoSQL & Docs

[Dy DynamoDB](https://www.dreamfactory.com/connectors/dynamodb) [Do DocumentDB](https://www.dreamfactory.com/connectors/azure-documentdb) [Mo MongoDB](https://www.dreamfactory.com/connectors/mongodb) [Cb CouchDB](https://www.dreamfactory.com/connectors/couch-db)

Cloud Warehouses

[S3 S3](https://www.dreamfactory.com/connectors/amazon-s3) [Ab Azureblob](https://www.dreamfactory.com/connectors/azure-blob) [FS FTP/SFTP](https://www.dreamfactory.com/connectors/ftp-sftp) [LS Local Storage](https://www.dreamfactory.com/connectors/local-storage)

C & SaaS

[Sf Salesforce](https://www.dreamfactory.com/connectors/salesforce) [API REST / SOAP](https://www.dreamfactory.com/connectors/soap-to-rest)

[See all 30+ connectors](https://www.dreamfactory.com/connectors)

[![back arrow](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/orange-arrow.svg) Blog](https://blog.dreamfactory.com/)

# Basic Authentication for REST APIs

 by Kevin Hood

![calendar icon](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/calendar-icon.svg) March 17, 2025

Table of contents

RECOMMENDED ARTICLES

- [A Complete Guide to API Generation](https://blog.dreamfactory.com/a-complete-guide-to-api-generation)
- [10 Best API Management Tools](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools)
- [Creating a Microsoft SQL Server API in Less Than 5 minutes with DreamFactory](https://blog.dreamfactory.com/creating-a-microsoft-sql-server-api-in-less-than-5-minutes-with-dreamfactory)
- [Hasura vs. DreamFactory: A Comprehensive Comparison](https://blog.dreamfactory.com/hasura-vs-dreamfactory)
- [Build A Snowflake REST API in Less Than 5 Minutes](https://blog.dreamfactory.com/generate-a-snowflake-rest-api-in-less-than-5-minutes)

[Basic Authentication](https://wiki.dreamfactory.com/DreamFactory/Tutorials/Basic_Auth) is a simple way to secure [REST APIs](https://blog.dreamfactory.com/rest-apis-for-government) using a username and password. Here's what you need to know:

- **How it works**: Credentials are sent encoded in Base64 through HTTP headers. The server decodes and verifies them.
- **Strengths**: Easy to set up, low processing overhead, works well with HTTPS.
- **Weaknesses**: Sends credentials with every request, vulnerable without TLS/SSL, not ideal for large-scale systems.
- **Best use cases**: Internal systems, development environments, or small-scale applications.

### Quick Security Tips:

- Always use HTTPS to encrypt credentials.
- Store passwords securely with hashing (e.g., [bcrypt](https://en.wikipedia.org/wiki/Bcrypt)).
- Implement [Role-Based Access Control](https://docs.dreamfactory.com/Security%20and%20Authentication/role-based-access) (RBAC) and rate limiting.
- Regularly update and rotate [API keys](https://docs.dreamfactory.com/Security%20and%20Authentication/api-keys) or credentials.

For production environments, consider more secure methods like [OAuth 2.0](https://wiki.dreamfactory.com/DreamFactory/Tutorials/Using_OAuth) or JWT. Pair Basic Authentication with strong security practices to minimize risks.

## How does HTTP Basic Access Authentication work?

## Setup Guide

Follow these steps to configure secure Basic Authentication for both the server and client.

### Server Setup Steps

Setting up Basic Authentication on the server involves configuring authentication middleware and securely managing credentials. While you can set this up manually, tools like [DreamFactory](https://dreamfactory.com/) simplify the process by generating [secure REST APIs](https://blog.dreamfactory.com/securely-mobilizing-data-with-a-rest-api-backend) with minimal effort.

- **Configure Authentication Middleware**  
   Enable HTTPS/TLS, validate credentials, and hash passwords. Set up Role-Based Access Control (RBAC) and define API endpoint permissions.
- **Define Access Rules**  
   Use RBAC to assign roles and permissions. Configure endpoint access and establish rate-limiting policies to prevent abuse.
- **Implement Error Handling**  
   Create proper 401/403 error responses, log failed login attempts, and set up retry policies for added resilience.

> "DreamFactory streamlines everything and makes it easy to concentrate on building your front end application. I had found something that just click, click, click... connect, and you are good to go." - Edo Williams, Lead Software Engineer, Intel

### Client Setup Steps

Client-side configuration ensures secure and authenticated requests to the server.

- **Initialize Security Components**  
   Set up an HTTPS client, configure secure credential storage, and implement retry logic for failed requests.
- **Manage Authentication**  
   Store credentials securely, encode them using Base64, and include them in authentication headers for each request.
- **Error Management**  
   Handle authentication failures gracefully and monitor connection security to prevent vulnerabilities.

### Security Setup Guidelines

Basic Authentication requires extra precautions to avoid potential risks. Use this checklist to address common vulnerabilities:

| Security Measure | Implementation | Purpose |
| --- | --- | --- |
| **HTTPS Encryption** | Use TLS 1.2 or higher | Protect credentials in transit |
| **Password Storage** | Apply secure hashing | Prevent credential exposure |
| **Access Control** | Implement RBAC | Restrict resource access |
| **Rate Limiting** | Throttle requests | Defend against brute force |
| [**API Key Management**](https://community.dreamfactory.com/t/api-key-access-for-users-of-an-app/1209) | Rotate keys regularly | Add an extra layer of security |

DreamFactory enhances security by offering multiple authentication options (e.g., OAuth, SAML, Active Directory) and comprehensive [API security](https://blog.dreamfactory.com/api-security-fundamentals-everything-you-need-to-know) controls. Since Basic Authentication transmits credentials with every request, HTTPS encryption is crucial. Combine this with measures like API key management and RBAC to build a robust defense for your API infrastructure.

## Making API Requests

### Creating Auth Headers

To use Basic Authentication, you need to include an `Authorization` header in your API request. The format looks like this:

`Authorization: Basic <base64-encoded-credentials>`.

Start by formatting your credentials as `username:password` (e.g., `api_user:secretPass123`), then encode them using Base64.

### Base64 Credential Encoding

Most programming languages include built-in Base64 functions to help with encoding. Here's an example in Python:

```
import base64

credentials = "api_user:secretPass123"
encoded = base64.b64encode(credentials.encode()).decode()
# Output: YXBpX3VzZXI6c2VjcmV0UGFzczEyMw==
```

### Sample Request Code

Below are examples of making [API requests](https://wiki.dreamfactory.com/DreamFactory/Features/API_Limits) with Basic Authentication in Python and JavaScript.

**Python Example:**

```
import requests
import base64

username = "api_user"
password = "secretPass123"
credentials = f"{username}:{password}"
encoded_credentials = base64.b64encode(credentials.encode()).decode()

headers = {
    "Authorization": f"Basic {encoded_credentials}",
    "Content-Type": "application/json"
}

response = requests.get(
    "https://api.example.com/data",
    headers=headers
)
```

**JavaScript Example:**

```
const username = 'api_user';
const password = 'secretPass123';
const credentials = btoa(`${username}:${password}`);

fetch('https://api.example.com/data', {
    method: 'GET',
    headers: {
        'Authorization': `Basic ${credentials}`,
        'Content-Type': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```

If you're using DreamFactory, you don't need to manually add the Basic Authentication header - DreamFactory handles it for you.

### Common HTTP Status Codes

| **HTTP Status Code** | **Meaning** | **Troubleshooting** |
| --- | --- | --- |
| 401 Unauthorized | Invalid credentials | Double-check your username and password. |
| 403 Forbidden | Valid credentials but insufficient permissions | Review the user's role and permissions. |
| 400 Bad Request | Malformed authentication header | Ensure credentials are correctly Base64 encoded. |
| 200 OK | Successful authentication | The request was processed without issues. |

Always ensure your credentials are up-to-date for every request. This minimizes errors and ensures smooth communication with the API.

## Security Guidelines

These guidelines focus on improving HTTPS usage, securing passwords, and implementing measures to guard against attacks.

### Using HTTPS

To protect credentials during Basic Authentication, make sure to enable HTTPS. Here's how:

- Get an SSL/TLS certificate from a reliable provider.
- Configure your web server to support HTTPS and redirect all HTTP traffic to HTTPS.
- Update your API endpoints to use "https://" instead of "http://".

### Password Security

Proper password storage is crucial. Follow these practices:

- Use strong hashing algorithms like **bcrypt** or [**Argon2**](https://en.wikipedia.org/wiki/Argon2), combined with unique salts.
- Require passwords to be at least 12 characters long, including a mix of uppercase, lowercase, numbers, and symbols.
- Manage sensitive credentials through environment variables or secure key management systems.

### Attack Prevention

Protect your API with these steps:

- Use rate limiting to prevent repeated unauthorized attempts.
- Implement Role-Based Access Control (RBAC) to manage permissions effectively.
- Set up logging and alerts to monitor for and respond to unusual activity.

Platforms like DreamFactory simplify this process by automating features like RBAC, rate limiting, and secure credential management.

## Other Auth Methods

### Auth Method Comparison

Different authentication methods provide varying levels of security and complexity. Here's a quick breakdown:

| Auth Method | Security Level | Implementation Complexity | Best Use Cases | Key Advantages |
| --- | --- | --- | --- | --- |
| Basic Authentication | Basic | Low | Internal APIs, Development | Simple to set up and widely supported |
| OAuth 2.0 | High | High | Public APIs, Third-party apps | Token-based access with customizable permissions |
| API Keys | Medium | Low | B2B integrations | Easy to manage and revoke |
| JWT | Medium-High | Medium | Microservices, SPAs | Stateless and self-contained |

This table can help you determine which method fits your project's needs.

### Choosing Auth Methods

Your choice of authentication should depend on your security needs and the complexity you're willing to manage.

- **Basic Authentication** is a great fit for internal applications when paired with HTTPS and features like rate limiting. It's simple but can be bolstered with additional security layers.
- **OAuth 2.0** works well for public APIs and third-party applications due to its strong security and flexibility.
- **API Keys** strike a balance between security and simplicity, making them a practical option for B2B integrations. They are easier to manage and revoke compared to Basic Authentication credentials.
- **JWT** is ideal for microservices or single-page applications (SPAs) because it's stateless and self-contained.

Tools like DreamFactory can simplify complex security setups, reducing risks and streamlining management.

When deciding, consider factors like user experience, compliance requirements, scalability, and ongoing maintenance. Your authentication strategy should align closely with your API security goals.

## Summary

Basic Authentication is a widely used method for securing REST APIs, especially in internal applications and development environments. Its effectiveness depends on pairing it with strong security practices.

Here are some key steps to ensure better security:

- Use **HTTPS encryption** to protect credentials during transmission.
- Enforce **strong password policies** and schedule regular password updates.
- Apply **rate limiting** to guard against brute force attacks.
- Set up **detailed logging** to monitor and detect suspicious activity.
- Implement **Role-Based Access Control (RBAC)** for precise access management.

Modern API platforms, such as DreamFactory, simplify and strengthen Basic Authentication by automating security controls.

While Basic Authentication works well for internal use when properly secured, public-facing or sensitive applications should consider more advanced options like OAuth 2.0 or JWT.

Keep in mind, authentication is just one piece of the API security puzzle. Combine it with input validation, proper error handling, and regular security audits to build a stronger defense.

## Related Blog Posts

- [API Security Checklist: Essential Controls for Enterprise APIs](https://blog.dreamfactory.com/blog/api-security-checklist-essential-controls-for-enterprise-apis/)
- [Breaking Down Silos: Using DreamFactory to Connect Your Legacy ERP to the Cloud](https://blog.dreamfactory.com/blog/breaking-down-silos-using-dreamfactory-to-connect-your-legacy-erp-to-the-cloud/)
- [Solving Common REST API Authentication Challenges with DreamFactory](https://blog.dreamfactory.com/blog/solving-common-rest-api-authentication-challenges-with-dreamfactory/)
- [Introducing DreamFactory v7.0.1: Unlocking Enhanced API Management Capabilities](https://blog.dreamfactory.com/blog/introducing-dreamfactory-v701-unlocking-enhanced-api-management-capabilities/)

![Kevin Hood](https://blog.dreamfactory.com/hs-fs/hubfs/Imported%20sitepage%20images/T9J6AH3S5-U08J3CS0K7C-ef0996ecbb6c-512.jpg?width=100&height=100&name=T9J6AH3S5-U08J3CS0K7C-ef0996ecbb6c-512.jpg)

Kevin Hood

Kevin Hood is an accomplished solutions engineer specializing in data analytics and AI, enterprise data governance, data integration, and API-led initiatives.

 Stay Connected with   
 The Connector Newsletter!

 Subscribe to stay up-to-date with DreamFactory's latest product updates, API best practices, and tech humor in your inbox.

[![Dreamfactory Logo](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/Megamenu-logo.svg)](https://www.dreamfactory.com/)

[Call Sales +1 (415) 993-5877](tel:+14159935877)

Open – Mon–Fri 9–5 PT

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

#### Follow us

- [GitHub](https://github.com/dreamfactorysoftware/dreamfactory)
- [Facebook](https://www.facebook.com/dfsoftwareinc/)
- [X (Twitter)](https://twitter.com/dfsoftwareinc)
- [LinkedIn](https://www.linkedin.com/company/dreamfactory-software)
- [YouTube](https://www.youtube.com/c/dreamfactorysoftware)

### Features

[Features](https://www.dreamfactory.com/features) [Self hosted](https://www.dreamfactory.com/features#self) [API Generation](https://www.dreamfactory.com/features#api) [Security](https://www.dreamfactory.com/features#secure) [Customization](https://www.dreamfactory.com/features#custom) [Pricing](https://www.dreamfactory.com/pricing)

### Installers

[Linux](https://www.dreamfactory.com/features#installer) [Docker](https://www.dreamfactory.com/features#installer) [Kubernetes](https://www.dreamfactory.com/features#installer)

### API Resources

[Documentation](https://docs.dreamfactory.com/) [Case Studies](https://www.dreamfactory.com/stories) [White Papers](https://www.dreamfactory.com/resources/whitepapers) [Academy](https://www.dreamfactory.com/academy) [API Calculator](https://calculator.dreamfactory.com) [Open Source](https://github.com/dreamfactorysoftware)

### Company

[Blog](https://blog.dreamfactory.com/) [Hub](https://www.dreamfactory.com/hub) [About us](https://www.dreamfactory.com/about) [Partners](https://www.dreamfactory.com/partners) [Support](https://www.dreamfactory.com/support) [Connectors](https://www.dreamfactory.com/connectors) [Contact Us](https://www.dreamfactory.com/demo)

 © 2025 DreamFactory. All rights reserved.

[Terms of Use](https://www.dreamfactory.com/terms-of-use) [Privacy Policy](https://www.dreamfactory.com/privacy-policy) [LLMs](https://www.dreamfactory.com/llms.txt)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Kevin Hood",
    "url" : "https://blog.dreamfactory.com/author/kevin-hoo"
  },
  "dateModified" : "2025-03-24T15:00:02.938Z",
  "datePublished" : "2025-03-18T02:57:15.000Z",
  "headline" : "Basic Authentication for REST APIs",
  "image" : [ "https://assets.seobotai.com/cdn-cgi/image/quality=75,w=1536,h=1024/dreamfactory.com/67d8c6aebeb3268b1c6ada90-1742266681941.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.dreamfactory.com/basic-authentication-for-rest-apis",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.dreamfactory.com/hubfs/DreamFactory%20-%20Orange%20-%20Transparent-1.png"
    }
  }
}
```