Question Details

Answered
How do I message one Line Bot from another Bot?

I am trying to implement use of the "line-bot-api" java sdk to test that I can send and recieve messages from a line bot.

Scenario:

  • Implementing an automation test to verify that my application conencted to the "IntegrationLineBot" will recieve and reply to messages correctly. botA = "userLineBot" botB = "IntegrationLineBot"
  1. "botA" sends a message to "botB"
  2. "botB" routes my applications reply back to "BotA"
  3. "BotA" reactes to the event and replies to the message sending the reply back to "botB"

Before writing my java code I've been trying to use the pushMessage api call using Postman make sure I can do this.

I've tried using the "channel access token" from botA, and the "user ID" for my botB. But this returns a 400 Bad Request "message": "Failed to send messages"

Is it possible to send messages from one bot to another? Does a bot have a "userID" that I can use to send a message to from another bot? If so how do I get it?

0
Edited: 8 months ago
Profile picture
Gial Ackbar

Answers

1
Profile picture
Mick Satana
Posted: 7 months ago

You cannot do that. I believe the reason may be some malicious developer might use it as a security hole to create endless replies loop.

Bot does not have userId, however it can act on behalf of a user to send message back from LIFF app.

Are you sure? question.vm