Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error::sendWhatsappMessageToConnect AccessDeniedException: Access denied #3

Open
Tarunjain19 opened this issue Oct 29, 2020 · 0 comments

Comments

@Tarunjain19
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant