-
Notifications
You must be signed in to change notification settings - Fork 8
Configuring Via API
Gurpreet Singh edited this page Dec 15, 2017
·
16 revisions
You can also update configuration of the emulator using rest API (currently it has an issue as you have to restart the express server after changes)
Update configuration Any keys not set up in ENV will be save to json data file.
[PUT] http://localhost:3000/v2.6/configuration
{
"configuration":{
"webHookUrl": "http://localhost/mydev/webhook",
"pageScopeId": "YOUR_PAGE_SCOPE_ID",
"appSecret": "YOUR_APP_SECRET",
"pageAccessToken": "YOUR_PAGE_ACCESS_TOKEN"
}
}
Display active configuration
[GET] http://localhost:3000/v2.6/configuration
Update image list for image send function
[POST] http://localhost:3000/v2.6/me/messenger_profile?access_token=ANY
{
"images":["Image1 url","Image 2 url",.....]
}
Other Send API specific things can be configured as specified by instructions [here]https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api)