Poplite Notification API Document
Authentication method

Request header authorization: Grants bearer and accesses. If the access token used is invalid, a 401 status code and WWW-Authenticate header is returned

POST https://poplite.in.th/api/notify

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).

Request method

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>
Request parameters
The parameters are as follows.
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.
Response
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
Response body
The response body is a JSON object type.
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
Sample
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"}