MINNELLYJAKELINELU | 2018-11-23 15:36:58 UTC | #1
Good morning. We have integrated PureCloud with a CRM in house https which is opened by an action in the script. We have problems when generating a call from the "Lamar" button from the client's CRM, since the call is not generated in the PureCloud advisor session but all these calls are being generated towards a single session that corresponds to the of an administrator in Purecloud and who generates a token for authentication. So the question is: What would be the solution so that each user that generates a call from the CRM can exit through the API to the correct session of each agent by PureCloud? The function used is: /api/v2/conversations/calls
On the other hand, I commented that we have detected that if the session of the administrator that generates the token closes, the token expires and the disconnection of the call and wrap-up does not work. Is there any reason why this token is expired? Or what other option do we have to have a valid token for 24 hours? I confirm that in the Oauth configuration we have validity of this 15-hour token.
Code: Configuration.Default.AccessToken = access_token; var apiConversations = new ConversationsApi(); CreateCallRequest createCallRequest = new CreateCallRequest(); createCallRequest.PhoneNumber = telefono; CreateCallResponse createCallResponse = apiConversations.PostConversationsCalls(createCallRequest);
Regards,
tim.smith | 2018-11-26 18:09:31 UTC | #2
MINNELLYJAKELINELU, post:1, topic:4035
a single session that corresponds to the of an administrator in Purecloud and who generates a token for authentication
Absolutely do not do this. Every user must authenticate as themselves. Sharing a user's session like this is an improper usage of the platform and is would likely be considered abusive. The "issues" you're experiencing are fully expected due to the way you're misusing authentication.
You will need to implement one of the Authorization flows in your application. Depending on the architecture of your application, you will want to choose either the Implicit or Auth Code grant. If this is a desktop .NET app (vs. ASP.NET or something already in a web context), there is a .NET control to assist with authentication in a .NET desktop context.
MINNELLYJAKELINELU | 2018-11-26 19:29:48 UTC | #3
Good afternoon. Maybe I did not explain in more detail before, I commented that each user authenticates in PureCloud independently, since we are integrated with a WEB CRM. Every day a token is generated to be able to carry out transactions, what happens now is that this token generation makes use of the credentials of a single person who works as a PureCloud administrator. If the session of this administrator is closed, I have a token expiration that does not allow me to function correctly. Another problem is that the calls generated by each user logged into Purecloud and invoke the API are being recorded from the Administrator session. I suppose that is what you mention in your answer. That being the case, I have a question: Should a token be generated for each user that uses PureCloud?
Regards,
MINNELLYJAKELINELU | 2018-11-26 19:30:33 UTC | #4
Additional I commented that we are using the Implicit authentication type.
tim.smith | 2018-11-26 20:00:48 UTC | #5
MINNELLYJAKELINELU, post:3, topic:4035
what happens now is that this token generation makes use of the credentials of a single person who works as a PureCloud administrator. If the session of this administrator is closed, I have a token expiration that does not allow me to function correctly.
This is exactly what I'm saying that you must not do. Your application must authenticate and obtain an auth token for each user. What you are describing is authenticating a single user and sharing that single user's auth token for all users.
MINNELLYJAKELINELU, post:3, topic:4035
Another problem is that the calls generated by each user logged into Purecloud and invoke the API are being recorded from the Administrator session.
That's because you're using that administrator user's session to dial the call. This is why your application must authenticate each user and use the correct auth token for the user making the request.
MINNELLYJAKELINELU | 2018-11-26 20:22:30 UTC | #6
Thank you veru much, if I present another concern I will make you know.
MINNELLYJAKELINELU | 2018-11-30 14:48:01 UTC | #7
Hello Tim, we have implemented the recommended solution, now we have the token expiration for each user on many occasions, it is not valid for one minute after being generated by each user and indicated that in the Oauth configuration we have a duration of 24 hours for that the token can expire and this is not being fulfilled. Attach the error log that we have for your help please. This is extremely urgent.
tim.smith | 2018-11-30 15:23:04 UTC | #8
Those errors are telling you that the user lacks the stated permission, not that the auth token isn't valid. Please review the permissions assigned to the user.
MINNELLYJAKELINELU | 2018-11-30 15:49:35 UTC | #9
tim.smith, post:8, topic:4035, full:true
Those errors are telling you that the user lacks the stated permission, not that the auth token isn't valid. Please review the permissions assigned to the user.
For policies and confindecialidad we can not grant certain permissions to the users please could you indicate to me what permissions or functions it refers exactly? although I commented that we have tested with users who have all the permissions to be administrators and we get the same behavior.
tim.smith | 2018-11-30 16:26:29 UTC | #10
MINNELLYJAKELINELU, post:9, topic:4035
could you indicate to me what permissions
Take a look at the screenshot you posted above. It indicates which permission the user is missing.
MINNELLYJAKELINELU, post:9, topic:4035
we have tested with users who have all the permissions to be administrators and we get the same behavior.
Please verify that the roles assigned to the users in question have the permission it needs. The error message you posted indicates that you have not configured permissions correctly.
MINNELLYJAKELINELU | 2018-11-30 19:53:55 UTC | #11
tim.smith, post:10, topic:4035
Please verify that the roles assigned to the users in question have the permission it needs. The error message you posted indicates that you have not configured permissions correctly.
Hi, Do you confirm that this is the necessary permission for each of the users, please: Conversation Communication disconnect?
tim.smith | 2018-11-30 19:56:18 UTC | #12
Yes, that's the permission shown in your screenshot.
MINNELLYJAKELINELU | 2018-12-03 14:34:08 UTC | #13
tim.smith, post:12, topic:4035, full:true
Yes, that's the permission shown in your screenshot.
Thank you very much.
MINNELLYJAKELINELU | 2018-12-05 15:53:34 UTC | #14
Hi Tim, after assigning the permission to the users, now we have three new API connection errors, please, you can help us to get this over with as soon as possible:
Error calling GetAnalyticsConversationDetails: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.GetAnalyticsConversationDetailsWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.TipificacionMarcador()
Error calling PostConversationDisconnect: No es posible conectar con el servidor remoto en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
Error calling PostConversationDisconnect: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
Regards,
MINNELLYJAKELINELU | 2018-12-05 16:09:32 UTC | #15
MINNELLYJAKELINELU, post:14, topic:4035
Error calling GetAnalyticsConversationDetails: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.GetAnalyticsConversationDetailsWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.TipificacionMarcador()
Error calling PostConversationDisconnect: No es posible conectar con el servidor remoto en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
Error calling PostConversationDisconnect: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
I update the errors, there are four:
Error calling GetAnalyticsConversationDetails: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.GetAnalyticsConversationDetailsWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.TipificacionMarcador()
Error calling GetConversation: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.GetConversationWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.imgEncuesta_Click(Object sender, ImageClickEventArgs e)
Error calling PostConversationDisconnect: No es posible conectar con el servidor remoto en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
Error calling PostConversationDisconnect: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
Regards,
tim.smith | 2018-12-06 15:22:28 UTC | #16
MINNELLYJAKELINELU, post:15, topic:4035
Error calling GetAnalyticsConversationDetails: Se excedió el tiempo de espera de la operación en PureCloudPlatform.Client.V2.Api.ConversationsApi.GetAnalyticsConversationDetailsWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.TipificacionMarcador()
That's a timeout error. Please open a case with PureCloud Care to investigate.
MINNELLYJAKELINELU, post:15, topic:4035
Error calling PostConversationDisconnect: No es posible conectar con el servidor remoto en PureCloudPlatform.Client.V2.Api.ConversationsApi.PostConversationDisconnectWithHttpInfo(String conversationId) en CRMCOBRA.GestionMarcador.Colgar_Click(Object sender, ImageClickEventArgs e)
That says it can't connect to the remote server. If you can make other requests, this sounds like a network issue on your side that you're unable to connect to PureCloud. Please open a case with PureCloud Care if you need it investigated further.
MINNELLYJAKELINELU | 2018-12-06 15:59:47 UTC | #17
tim.smith, post:16, topic:4035
That says it can't connect to the remote server. If you can make other requests, this sounds like a network issue on your side that you're unable to connect to PureCloud. Please open a case with PureCloud Care if you need it investigated further.
Hi Tim, case 0002404205 is open for investigation.
tim.smith | 2018-12-06 16:14:58 UTC | #18
In the future, if you're already working with Care, please continue to work with them. The Dev Forum is not an alternative to the services that Care provides.
system | 2019-01-06 16:19:29 UTC | #19
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: 4035