maxw | 2018-05-31 02:53:34 UTC | #1
Dear Sir/Madam,
I tried to make a call with API followed by example, but get an error as "Method Not Allowed".
My code is very simple as below:
var api = new ConversationsApi(); api.Configuration.AccessToken = accessToken;
CreateCallRequest body = new CreateCallRequest { PhoneNumber = "XXXXXXXX", CallerId = "a2fdecf5-0b49-4a2c-ab33-809d41a9ea59", CallerIdName = "XXXXXXX", CallFromQueueId = "acc931da-4fa3-4154-a771-be33210e9c89", Priority = 0 };
try { CreateCallResponse result = api.PostConversationsCalls(body); Console.WriteLine(result.Id); } catch (Exception ex) { Console.WriteLine(ex.Message); }
Please check attached image for exception:
tim.smith | 2018-05-31 12:15:46 UTC | #2
Are you setting the environment somewhere? Can you share that code please? The ResponseUri doesn't look right; it should be using api.mypurecloud.com.au, not the login subdomain.
In the future, please provide correlation IDs in text, not in an image.
maxw | 2018-06-01 01:37:08 UTC | #3
Hi Tim,
The call part is working now. But I got error as: "CALL ERROR error.ininedgecontrol.connection.station.notReached". I use postman do the testing:
{ "phoneNumber": "my phone number", "callerId": "a2fdecf5-0b49-4a2c-ab33-809d41a9ea59", "callerIdName": "my name", "callFromQueueId": "acc931da-4fa3-4154-a771-be33210e9c89", "priority": 0 }
I could see calls in interactions with right queue on it. But keep connecting for a while then saw error. I could call this number if I use purecloud web UI.
Can you give me some suggestions?
Thanks.
tim.smith | 2018-06-01 02:23:25 UTC | #4
Are you using a WebRTC station? Can you provide the correlation ID please?
maxw | 2018-06-01 03:12:59 UTC | #5
Hi Tim,
We do use WebRTC station. And could you check below ids: 8b44d768-bed3-4a98-aad4-800b1b74ec55 595c791e-2e19-4198-bc52-f1fae957db84.
Thanks
tim.smith | 2018-06-01 12:38:11 UTC | #6
You can't place outbound calls with the API when you're using a WebRTC station. You'll need to either use a physical phone or place calls using the PureCloud UI. I've added your request to the feature.
system | 2018-07-02 12:49:20 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2935