Get Credentials
Response
Indicates if credentials were retrieved successfully
WhatsApp Business API credentials
WhatsApp phone number ID (visible)
API access token (masked as
••••••••)App secret for webhook validation (masked)
Webhook verification token (visible)
Whether complete WhatsApp credentials are configured
Google OAuth credentials for Calendar API
Google OAuth client ID (visible)
OAuth client secret (masked)
OAuth access token (masked)
OAuth refresh token (masked)
Google Calendar ID (visible)
Whether complete Google credentials are configured
Success Response Example
Save Credentials
Request
Service to configure:
"whatsapp", "openai", or "google"WhatsApp Parameters
WhatsApp Business phone number ID
WhatsApp API access token (will be encrypted)
App secret for webhook validation (will be encrypted)
Webhook verification token
OpenAI Parameters
OpenAI API key (will be encrypted)
GPT model name (e.g.,
"gpt-4o")Embedding model for RAG (e.g.,
"text-embedding-3-small")Google Parameters
Google OAuth client ID
OAuth client secret (will be encrypted)
OAuth access token (will be encrypted)
OAuth refresh token (will be encrypted)
Google Calendar ID to use
Response
Indicates if credentials were saved successfully
Confirmation message
Error description (only present on failure)
Examples
Success Response
Error Responses
Invalid Service
Missing Service Field
Error Handling
| Status Code | Description |
|---|---|
| 200 | Credentials saved successfully |
| 400 | Invalid input or service |
| 405 | Method not allowed (GET/POST required) |
| 500 | Internal server error |
Security
Source implementation:- GET:
api/get-credentials.php:12-47 - POST:
api/save-credentials.php:28-65 - Encryption: Uses
App\Services\EncryptionServiceandApp\Services\CredentialService