Request header authorization: Grants bearer
Sends notifications to users or groups that are related to an access token.
Requests use POST method with application/x-www-form-urlencoded (Identical to the default HTML form transfer type).
the access token can be request from the admin of that group
Request methods/headers | Value |
---|---|
Method | POST |
Content-Type | application/x-www-form-urlencoded OR multipart/form-data |
Authorization | Bearer <access_token> |
Parameter name | Required/optional | Type | Description |
---|---|---|---|
message | required | string | 1000 characters max |
imageThumbnail | Optional | HTTPS URL | Maximum size of 240×240px JPEG, JPG or PNG |
imageFullsize | Optional | HTTPS URL | Maximum size of 2048×2048px JPEG, JPG or PNG |
imageFile | Optional | File | Upload a image file to the Poplite server. |
Request methods/headers | Value |
---|---|
status |
200: Success 400: Validation failed 401: Invalid chat token 500: Failure due to server error Other: Processed over time or stopped |
Content-Type | application/json |
Name | Type | Value Description |
---|---|---|
status | number |
200: Success 400: Validation failed 401: Invalid chat token 500: Failure due to server error Other: Processed over time or stopped |
message | string | Message visible to end-user |
curl -X POST https://www.poplite.in.th/api/notify \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Authorization: Bearer <YOUR_TOKEN_HERE>" \ -d "message=Hello from Pop Lite!"
{"status":200,"message":"ok"}
curl -X POST https://www.poplite.in.th/api/notify \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Authorization: Bearer <invalid_token>" \ -d "message=foobar!"
{"status":401,"message":"Invalid access token"}