Overview
The Test Connection API allows you to validate if the entered endpoint details are valid. The API verifies if the provided endpoint URL, workspace ID an data key is accessible and responds without any errors.
Base URL
https://api-0X.moengage.com/v1/integrations/authentication
Here X is your MoEngage datacenter. Know more
Request Headers
Key | Required | Sample Values | Description |
---|---|---|---|
MOE-APPKEY |
Required |
{MoEngage data API key} |
This is your MoEngage account's data API keythat has to be passed along with the request. You can find it in the following navigation on the Dashboard: Revamped UI: Settings -> Account -> APIs -> API Keys -> Data Old UI: Settings -> API -> General Settings -> DATA API |
Content-Type |
Required |
{"Content-Type": "application/json"} |
Set the Content-Type header to application/json. |
Authorization |
Required |
{"Authorization": "Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U=="} |
This authentication parameter, used for access control, must be passed along with the request. To generate the authentication header, refer to Authentication. |
Request Body
Key | Required | Values | Description |
---|---|---|---|
app_id | Required | String |
This is your MoEngage workspace ID that has to be passed along with the request. You can find it in the following navigation on the Dashboard: Revamped UI: Settings -> Account -> APIs -> Workspace ID Old UI: Settings -> API -> General Settings -> App ID |
app_secret | Required | String |
This is your MoEngage account's data API key that has to be passed along with the request. You can find it in the following navigation on the Dashboard: Revamped UI: Settings -> Account -> APIs -> API Keys -> Data Old UI: Settings -> API -> General Settings -> DATA API |
source | Required | String | This is the data source - basically the tool from where you are sending the request to MoEngage. |
region | Required | String |
This is your MoEngage region where the workspace is hosted. Value will be in the format of 0X, where X is your MoEngage data center. Know more |
Response
Key | Data Type | Description |
---|---|---|
status | String |
This field contains the status of the request and denotes whether it was successful or not. Example: "status": "success", "status": "error" |
app_name | String |
This field contains the workspace name of your MoEngage workspace |
Response Codes
Status Code | Request State | Description |
---|---|---|
200 |
Success |
This response is returned when the request is processed successfully. |
401 |
Authorization Failure |
This response is returned when the authorization parameters are missing in the HTTP Auth Header. |
Sample cURL Request
curl --location 'https://api-01.moengage.com/v1/integrations/authentication' \
--header 'MOE-APPKEY: ********' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic *****' \
--data '{
"app_id": "********",
"app_secret": "**********",
"source": "test",
"region": "01"
}'
Sample Response
Sample Response for a successful request
{
"status": "success",
"app_name": "PI-Prod-DC01"
}
Sample Response for validation failure
{
"status": "fail",
"error": {
"message": "App Secret key mismatch. Please login to the dashboard to verify key",
"type": "Authentication required",
"request_id": "kKcQUqvo"
}
}