messaging-api-slack
Advanced tools
Changelog
0.5.0 / 2017-10-20
For example, when you catch the error and log it out:
client.sendText().catch(console.error);
You can get some useful information to help you resolve the issue.
Error: Messenger API - 2500 OAuthException An active access token must be used to query information about the current user.
at handleError (/Users/chentsulin/Projects/yoctol/ttt/node_modules/messaging-api-messenger/lib/MessengerClient.js:64:9)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error Message -
Messenger API - 2500 OAuthException An active access token must be used to query information about the current user.
Request -
POST https://graph.facebook.com/v2.10/me/messages?access_token=
Request Data -
{
"recipient": {
"id": ""
},
"message": {
"text": ""
}
}
Response -
400 Bad Request
Response Data -
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "GOnNuiN/ewZ"
}
}
The error messages are powered by axios-error package.
client.getHTTPClient()
method is deprecated. use client.axios
getter instead.client.version
now return version number string (2.10
) instead of the v-prefix version (v2.10
).Changelog
0.4.3 / 2017-09-28
[new] Gets Payments API support! 🎉
sendInvoice
answerShippingQuery
answerPreCheckoutQuery
Changelog
0.4.2 / 2017-09-22
const { MessengerClient } = require('messaging-api-messenger');
const client = MessengerClient.connect(accessToken);
client.version; // "v2.10"
Changelog
0.4.1 / 2017-09-19
Changelog
0.3.5 / 2017-09-15
For example:
const { LINE } = require('messaging-api-line');
client.reply(REPLY_TOKEN, [
LINE.createText('Hello'),
LINE.createImage(
'https://example.com/original.jpg',
'https://example.com/preview.jpg'
),
LINE.createText('End'),
]);
Changelog
0.3.4 / 2017-09-13
sendBatch
:const { Messenger } = require('messaging-api-messenger');
client.sendBatch([
Messenger.createText(USER_ID, '1'),
Messenger.createText(USER_ID, '2'),
Messenger.createText(USER_ID, '3'),
Messenger.createText(USER_ID, '4'),
Messenger.createText(USER_ID, '5'),
]);
Changelog
0.3.0 / 2017-08-29
turnTypingIndicatorsOn => typingOn
turnTypingIndicatorsOff => typingOff
Use tag
option instead:
client.sendText(USER_ID, 'Hello!', { tag: 'ISSUE_RESOLUTION' });
client.sendGenericTemplate(
USER_ID,
[
{
// ...
},
],
{ tag: 'ISSUE_RESOLUTION' }
);
topElementStyle
to options.top_element_style
in sendListTemplate
@6840ec7ratio
to options.image_aspect_ratio
in sendGenericTemplate
@701e717SlackClient
export, using SlackOAuthClient
or SlackWebhookClient
instead.getUserList
now returns object includes cursor.contact.firstName
to contact.first_name
, and contact.phoneNumber
to contact.phone_number
in sendContact
method.