Giter VIP home page Giter VIP logo

tamdilip / whatsapp-amazonconnect-chat Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 8.0 762 KB

Node JS server for transferring real-time messages between WhatsApp and Amazon Connect Chat via Twilio's WhatsApp Business API Sandbox.

Home Page: https://tamdilip.github.io/whatsapp-amazonconnect-chat/

JavaScript 100.00%
amazon-connect dynamodb nodejs sdk-api twilio-sandbox twilio-whatsapp-sandbox voice websocket whatsapp whatsapp-amazonconnect-chat

whatsapp-amazonconnect-chat's Introduction

Hi there 👋

tamdilip portfolio

whatsapp-amazonconnect-chat's People

Contributors

dependabot[bot] avatar tamdilip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

whatsapp-amazonconnect-chat's Issues

Conversation is not working bi-directionally

Hi Team,
I have implemented the setup as suggested in this article and able to connect with chat agent from my WhatsApp number .

But conversation is not working bi-directionally i.e. I have only send message from my number to Agent but not able to
received the message whatever send by chat agent.

Could you suggest me how to check this issue . It can be any specific country wise number is required for testing.

Thanks & Regards
Tarun Jain

Error::sendWhatsappMessageToConnect AccessDeniedException: Access denied

Hi Team,

I am doing random testing and got one issue as explained below .

Use Case :- 1.Custome initiate the chat ,
                   2. Agent received and answered .
                  3. Now the Agent ends the chat .
                  4. The same customer sent the chat message again.
                   5.Application through the below error  while initiating the chat from a different number then working.

Error :-
  client.messages { accountSid: 'ACe1305ef50b020ec18bb9c88b5721e124' }
Success::sendMessage SM2c770e8a0ffc4c14a313e3428c266e14
CONNECT:: AGENT :: application/vnd.amazonaws.connect.event.participant.left
CONNECT:: undefined :: application/vnd.amazonaws.connect.event.chat.ended
Error::sendMessageToChat AccessDeniedException: Access denied
    at Object.extractError (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\protocol\json.js:51:27)
    at Request.extractError (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\protocol\rest_json.js:55:8)
    at Request.callListeners (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
    at Request.emit (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
    at Request.emit (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:683:14)
    at Request.transition (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:22:10)
    at AcceptorStateMachine.runTo (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\state_machine.js:14:12)
    at C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\state_machine.js:26:10
    at Request. (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:38:9)
    at Request. (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:685:12) {
  code: 'AccessDeniedException',
  time: 2020-10-29T06:32:44.336Z,
  requestId: '66f3f072-4b74-4c21-bb9c-0d45f10c0c07',
  statusCode: 403,
  retryable: false,
  retryDelay: 83.94447352367985
}
Error::sendWhatsappMessageToConnect AccessDeniedException: Access denied
    at Object.extractError (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\protocol\json.js:51:27)
    at Request.extractError (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\protocol\rest_json.js:55:8)
    at Request.callListeners (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
    at Request.emit (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
    at Request.emit (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:683:14)
    at Request.transition (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:22:10)
    at AcceptorStateMachine.runTo (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\state_machine.js:14:12)
    at C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\state_machine.js:26:10
    at Request. (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:38:9)
    at Request. (C:\whatsapp-amazonconnect-chat\node_modules\aws-sdk\lib\request.js:685:12) {
  code: 'AccessDeniedException',
  time: 2020-10-29T06:32:44.336Z,
  requestId: '66f3f072-4b74-4c21-bb9c-0d45f10c0c07',
  statusCode: 403,
  retryable: false,
  retryDelay: 83.94447352367985
}

I have tried to troubleshoot this issue and got some work around:

route.txt

file name : route.js
Work around:- I have made a connection again in catch block . Attaching the file or your reference.
I am looking for better solution if anybody can help on this

Regards
Tarun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.