important:
This page references our older Objective-C SDK. Check out our new Swift SDK to integrate our latest Swift-first library.
Testing
If you’d like to test in-app and push notifications via the command line, you can send a single notification through the terminal via CURL and the messaging API. You will need to replace the following fields with the correct values for your test case:
Required fields:
YOUR-API-KEY-HERE
- available at Settings > API Keys. Ensure the key is authorized to send messages via the/messages/send
REST API endpoint.EXTERNAL_USER_ID
- available on the Search Users page.REST_API_ENDPOINT_URL
- listed on the Braze [Instances](/docs/api/basics/#endpoints. Ensure using the endpoint corresponds to the Braze instance your workspace is on.
note:
If you are using the older navigation, these pages are in a different location:
- API Keys is located at Developer Console > API Settings
- Search Users is located at Users > User Search
Optional fields:
YOUR_KEY1
(optional)YOUR_VALUE1
(optional)
1
2
3
4
5
6
7
8
9
10
11
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR-API-KEY-HERE" -d '{
"external_user_ids":["EXTERNAL_USER_ID"],
"messages": {
"apple_push": {
"alert":"Test push",
"extra": {
"YOUR_KEY1":"YOUR_VALUE1"
}
}
}
}' https://{REST_API_ENDPOINT_URL}/messages/send