CUC Forums

« Back to CUTI Questions

Error with message playback using admin credentails

Combination View Flat View Tree View
Threads [ Previous | Next ]
I'm getting an error while trying to play a message using admin credentials. The admin used for authentication has mailbox delegate role. I am able to connect to the specified extension successfully but not able to play the message on the specified extension.  Below is the request sent to server and the error received. if I use the user credentials and send the request mentioned below it works fine but I need this to work with admin user that has Mailbox delegate role. REQUEST   URI:https://10.3.105.181:8443/vmrest/calls/8   Method: POST  Body:{"op":"PLAY","resourceType":"MESSAGE","resourceId":"0:689542d2-4218-4cf3-9c21-676c0d7a58e8", "speed":"100","volume":"100","startPosition":"0","lastResult":"0"}     RESPONSE   Status returned 400:Bad_Request Raw Response Text: {"errors":{"code":"INVALID_PARAMETER","message":"mailbox can't be created for user: id=c253e9d2-2502-4c0d-879f-9ab5f2067fb1, message=null "}}    

With Admin credentials you need to pass the userobjectid as the query parameter, it will be the user who is calling.
With Admin credentials:
/vmrest/calls/8?userobjectid=<objectid>
 
With user credentials:
/vmrest/calls/8
 
If the userobjectid is not passed, the logged in user is treated as the mailbox user but an admin user is not someone who owns a mailbox. That is why you are getting this error.

-Utkarsh

Thanks Utkarsh! That worked. It'll be very helpful to others if this info is updated in your CUTI docs. We knew that it needs userobjectid but didn't know where to pass this info.

Sure, we will update the docs.