I'm trying to call a Contact Flow using AWS Node.js
SDK, but when I call startOutboundVoiceContact
function always I get the following error:
Error: ContactFlow type is invalid
Follow bellow the code I'm trying to execute:
var connect = new AWS.Connect(credentials);
const uuidv1 = require('uuid/v1');
var params = {
ContactFlowId: '............8af7-06898b1cd530', /* required */
DestinationPhoneNumber: '+55319.....375', /* required */
InstanceId: '........4c6c-aef3-5e4d8744580c', /* required */
Attributes: {},
ClientToken: uuidv1(),
QueueId: '',
SourcePhoneNumber: '+1800.....69'
};
connect.startOutboundVoiceContact(params, function (err, data) {
if (err)
console.log(err, err.stack); // an error occurred
else
console.log(data); // successful response
});
code:"InvalidParameterException" message:"ContactFlow type is invalid" name:"InvalidParameterException" requestId:"65ce71bf-5bb4-11e9-bba3-fd537199b3ea" retryable:false retryDelay:14.721126612979884 stack:"InvalidParameterException: ContactFlow type is invalid\n at Object.extractError (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\protocol\json.js:51:27)\n at Request.extractError (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\protocol\rest_json.js:52:8)\n at Request.callListeners (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\sequential_executor.js:106:20)\n at Request.emit (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\sequential_executor.js:78:10)\n at Request.emit (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:683:14)\n at Request.transition (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:22:10)\n at AcceptorStateMachine.runTo (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\state_machine.js:14:12)\n at C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\state_machine.js:26:10\n at Request. (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:38:... statusCode:400
Thanks for all help!