Reputation: 188
Tried doing a worker.update(...), worker.completeTask(...) and always getting a CORS error from localhost.
Upvotes: 0
Views: 278
Reputation: 479
Try adding this Policy to your back end. There is apparently a "bug" in the example code that Twilio provides and it has yet to be fixed.
This code is assuming a Node backend but the equivalent should work in any language
// Worker Activity update policy
new Policy({
url: util.workersUrl(workspaceSid, workerSid),
method: 'POST',
postFilter: {ActivitySid: {required: true}},
allow: true,
})
Upvotes: 1