[PR #6] [MERGED] feat: Allow API keys in request body #6

Closed
opened 2026-03-03 01:17:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Codegres-com/Simple-Whatsapp-API/pull/6
Author: @Codegres-com
Created: 9/30/2025
Status: Merged
Merged: 9/30/2025
Merged by: @Codegres-com

Base: mainHead: feat/body-api-key


📝 Commits (1)

  • 4caf4ad feat: Allow API keys in request body

📊 Changes

7 files changed (+355 additions, -245 deletions)

View changed files

📝 README.md (+15 -12)
📝 src/controllers/authController.js (+1 -9)
📝 src/controllers/messageController.js (+1 -9)
📝 src/middleware/masterAuthMiddleware.js (+3 -1)
📝 src/routes/api.js (+94 -18)
src/utils/apiKeyExtractor.js (+23 -0)
📝 whatsapp_api_collection.json (+218 -196)

📄 Description

This change allows both the X-MASTER-KEY and X-API-KEY to be sent in the request body for POST requests, providing more flexibility for users.

The key extraction logic has been centralized into a new helper function to improve code maintainability.

The Swagger documentation, Postman collection, and README have all been updated to reflect these changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Codegres-com/Simple-Whatsapp-API/pull/6 **Author:** [@Codegres-com](https://github.com/Codegres-com) **Created:** 9/30/2025 **Status:** ✅ Merged **Merged:** 9/30/2025 **Merged by:** [@Codegres-com](https://github.com/Codegres-com) **Base:** `main` ← **Head:** `feat/body-api-key` --- ### 📝 Commits (1) - [`4caf4ad`](https://github.com/Codegres-com/Simple-Whatsapp-API/commit/4caf4ad3af883fa3dc457a8e8dd3ab6a9c1c7d89) feat: Allow API keys in request body ### 📊 Changes **7 files changed** (+355 additions, -245 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+15 -12) 📝 `src/controllers/authController.js` (+1 -9) 📝 `src/controllers/messageController.js` (+1 -9) 📝 `src/middleware/masterAuthMiddleware.js` (+3 -1) 📝 `src/routes/api.js` (+94 -18) ➕ `src/utils/apiKeyExtractor.js` (+23 -0) 📝 `whatsapp_api_collection.json` (+218 -196) </details> ### 📄 Description This change allows both the `X-MASTER-KEY` and `X-API-KEY` to be sent in the request body for POST requests, providing more flexibility for users. The key extraction logic has been centralized into a new helper function to improve code maintainability. The Swagger documentation, Postman collection, and README have all been updated to reflect these changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:17:14 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Simple-Whatsapp-API#6
No description provided.