Update User Queue Agent Presence
Tags: rest api
Jun 2, 2017 at 4:33pm • 11 replies • 0 likes
andy-haas
I am trying to update the dndStatus for end users if they are not in the Q. So far I have this
$curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, "https://platform.ringcentral.com/restapi/v1.0/account/" . $RCaccountId . "/extension/" . $callerID . "/presence"); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $FINALHEADERS); curl_setopt($curl_handle, CURLOPT_PUT, true); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, '{"dndStatus": "TakeAllCalls"}');
$buffer = curl_exec($curl_handle);
The response I get is
Fatal error: Maximum execution time of 30 seconds exceeded
Any help will be much appreciated.
Thank You
Andy
11 Answers
I am doing this through the API. I am reading this doc to do exactly what we want to do.
If an end user is not in the Q we want to be able to programmatically edit their status.
Update User Queue Agent Presence
To enable or disable an user extension's queue agent presence, update the extension's presence
http://ringcentral-api-docs.readthedocs.io/en/latest/call_queue/
Thank You
Andy
If an end user is not in the Q we want to be able to programmatically edit their status.
Update User Queue Agent Presence
To enable or disable an user extension's queue agent presence, update the extension's presence
dndStatus
property.http://ringcentral-api-docs.readthedocs.io/en/latest/call_queue/
Thank You
Andy
0
AK,
Thank You for that.
Now missing another permission
{ "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "errors" : [ { "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "permissionName" : "EditPresenceStatus" } ], "permissionName" : "EditPresenceStatus" }{ "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "errors" : [ { "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "permissionName" : "EditPresenceStatus" } ], "permissionName" : "EditPresenceStatus" }
Thank You for Everything.
Andy
Thank You for that.
Now missing another permission
{ "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "errors" : [ { "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "permissionName" : "EditPresenceStatus" } ], "permissionName" : "EditPresenceStatus" }{ "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "errors" : [ { "errorCode" : "CMN-408", "message" : "[EditPresenceStatus] permission required", "permissionName" : "EditPresenceStatus" } ], "permissionName" : "EditPresenceStatus" }
Thank You for Everything.
Andy
0
Still Getting an 415 Unsupported Media Type. Here is the written code
$REQUEST_BODY = '{"dndStatus":"TakeAllCalls"}';
curl_setopt_array($curl, array(
CURLOPT_URL => " https://platform.ringcentral.com/restapi/v1.0/account/"; . $RCaccountId . "/extension/" . $callerID . "/presence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => '{"dndStatus":"TakeAllCalls"}',
CURLOPT_HTTPHEADER => [$REQUEST_HEADER_authorization, "Accept: application/json"]
));
I do now have EditPresence enabled on this project.
Thank You
Andy
$REQUEST_BODY = '{"dndStatus":"TakeAllCalls"}';
curl_setopt_array($curl, array(
CURLOPT_URL => " https://platform.ringcentral.com/restapi/v1.0/account/"; . $RCaccountId . "/extension/" . $callerID . "/presence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => '{"dndStatus":"TakeAllCalls"}',
CURLOPT_HTTPHEADER => [$REQUEST_HEADER_authorization, "Accept: application/json"]
));
I do now have EditPresence enabled on this project.
Thank You
Andy
0
Andy,
You would need to add the 'EditPresence' permission on your application in order to exercise this API endpoint.
Email the developer support team or submit a support ticket with your appKey and the necessary details and we would add the permission on your application at the earliest.
1
So I updated my erroring and I don't have EditPresence
The question I have is how do I get this. I looked at creating a new app but only Edit Messages were there.
{ "errorCode" : "InsufficientPermissions", "message" : "In order to call this API endpoint, application needs to have [EditPresence] permission", "errors" : [ { "errorCode" : "CMN-401", "message" : "In order to call this API endpoint, application needs to have [EditPresence] permission", "permissionName" : "EditPresence" } ], "permissionName" : "EditPresence" }
Thank You
Andy
The question I have is how do I get this. I looked at creating a new app but only Edit Messages were there.
{ "errorCode" : "InsufficientPermissions", "message" : "In order to call this API endpoint, application needs to have [EditPresence] permission", "errors" : [ { "errorCode" : "CMN-401", "message" : "In order to call this API endpoint, application needs to have [EditPresence] permission", "permissionName" : "EditPresence" } ], "permissionName" : "EditPresence" }
Thank You
Andy
0
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder