Problema de Autorización Kommo 3CX

Status
Not open for further replies.

Serticloud

Forum User
Basic Certified
Joined
May 28, 2024
Messages
2
Reaction score
0
Buenos días, tengo una integración entre el CRM Kommo y 3CX, lo que pasa es que presenta problemas porque constantemente se me desconecta, me toca volverla a autorizar y hasta no autorizarla nuevamente deja de función, por qué puede ser?
 
Hello @Serticloud,

Kommo CRM uses a variation of the OAuth2 authorization flow, which might lead to this. The standard OAuth2 works as follows:
1) You authorize the application, and get a refresh token, which should be a long lived token.
2) You use the refresh token to get an access token.
3) You use the access token to authorize your requests.

Usually, the refresh token can be used many times, to get a new access token before it expires. Other systems like Salesforce, HubSpot, Dynamics or Zoho CRM use this approach, and the refresh token remains valid after returning a new access token.

This is not the case for Kommo CRM. The REST API provided by Kommo CRM revokes the previous refresh token when it returns a new access token, returning a new refresh token every time. 3CX takes this new refresh token and stores it, so it can be used when requesting other access tokens. However, what happens if somehow the response from the REST API doesn't arrive to 3CX? You will lose access in this case, exactly what you're describing. The response from the REST API might not arrive to 3CX due to different reasons, networking issues, a socket disconnection, etc. This is why no CRM uses this approach, except by Kommo.

This has been reported to Kommo CRM, and they answered that this is how their API works, and it can't be changed....

Something else that might be triggering this, is restoring a 3CX backup. If you perform a daily backup, and at some point you restore it, you might be including in this restored configuration a refresh token that is already revoked. So if you're restoring a backup, ensure that you run the authorization again.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.