A DialogFlow webhook created for Messenger using Graph API.
Request:
GET /api/users
Response: 200
{
"data": [
{
"id": "1",
"name": "keith"
},
{
"id": "10",
"name": "lyka"
},
{
"id": "11",
"name": "angel"
}
]
}
Request:
GET /api/groups
Response: 200
{
"data": [
{
"name": "supervisors",
"users": [
{
"id": "13",
"name": "almer"
}]
},
{
"name": "interns",
"users": [
{
"id": "1",
"name": "keith"
},
{
"id": "10",
"name": "lyka"
}]
}]
}
Request:
POST /api/groups
{
"name": "supervisors",
"users": ["12", "13"]
}
Response: 200
Request:
DELETE /api/groups/:name
Example: DELETE /api/groups/supervisors
Response: 200
Request:
POST /api/message-user
{
"id": "3",
"message": "This is a message"
}
Response: 200
Request:
POST /api/message-user
{
"id": ["1","32","42"],
"message": "This is a message"
}
Response: 200
Request:
POST /api/message-group
{
"name": "supervisors",
"message": "This is a message"
}
Response: 200
Request:
POST /api/broadcast
Response: 200