Get Client by Secret Key
This endpoint retrieves client details using their secret key.
Endpoint
POST /api/client/get/secretKey
info
The secretKey
header is required for this endpoint. Make sure to pass a valid key.
Request
Headers
Key | Value |
---|---|
secretKey | your-secret-key |
Response
Success Response
{
"status": 200,
"results": {
"appDescription": "An E-commerce Platform",
"appUrl": "example.com",
"secretKey": "/RandomGeneratedSecretKey==",
"preferredSmsGateway": "ExampleSMS",
"preferredEmailGateway": null,
"preferredPushNotificationGateway": null,
"isHost": true,
"smsConfig": [
{
"providerName": "ExampleSMS",
"providerUrl": "https://portal.example-sms.com/",
"username": "[email protected]",
"senderId": "ExampleID",
"smsType": "Transactional",
"smsApi": "https://api.example-sms.com/sendsms",
"balanceUrl": "https://api.example-sms.com/user/balance",
"balance": 5000.0,
"perSmsCost": 0.5,
"isActive": true
}
]
}
}
Error Response
{
"status": 404,
"error": "Client not found"
}
Example Usage
Here’s how you can retrieve client details using cURL:
curl --request POST \
--url https://your-base-url/api/client/get/secretKey \
--header 'secretKey: your-secret-key'
Description of Response Fields
Top-Level Fields
Field | Type | Description |
---|---|---|
status | integer | The HTTP status code of the response. |
results | object | Contains the detailed client information if the request is successful. |
results
Object
Field | Type | Description |
---|---|---|
appDescription | string | A brief description of the client's application. |
appUrl | string | The URL of the client's application. |
secretKey | string | The unique secret key associated with the client. |
preferredSmsGateway | string | The name of the client's preferred SMS gateway. |
preferredEmailGateway | string | The name of the client's preferred email gateway (if configured). |
preferredPushNotificationGateway | string | The name of the client's preferred push notification gateway (if configured). |
isHost | boolean | Indicates whether the client is a host. |
smsConfig | array | A list of SMS configurations associated with the client. |
smsConfig
Array
Field | Type | Description |
---|---|---|
providerName | string | Name of the SMS provider. |
providerUrl | string | The portal URL for the SMS provider. |
username | string | The username used to authenticate with the SMS provider. |
senderId | string | The sender ID used for SMS messages (if applicable). |
smsType | string | Type of SMS (e.g., Transactional or Promotional). |
smsApi | string | The API endpoint for sending SMS. |
balanceUrl | string | The API endpoint to check the SMS balance. |
balance | float | The current balance of the SMS account. |
perSmsCost | float | The cost of sending one SMS message. |
isActive | boolean | Indicates whether the SMS configuration is active for the client. |