Solved 3CX - Salesforce - can't authorize token

Status
Not open for further replies.

md0987

Free User
Joined
Jun 26, 2021
Messages
17
Reaction score
3
Hi friends,

The integration between Salesforce and 3CX is failing - can't authorize the token, getting the log below:

Error occured while accessing CRM. Please check log provided.
Started OAuthGetAccessToken
Request text: https://login.salesforce.com/services/oauth2/token
Request form value code set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value grant_type set to authorization_code
Request form value client_id set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value client_secret set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value redirect_uri set to https://XXXXXXXXXXXXXXXX:5001/api/oauth2crm
Request form value state set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Response text: {"access_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","signature":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","scope":"full","id_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","instance_url":"https://XXXXXXXXXXXXX.my.salesforce.com","id":"https://login.salesforce.com/id/XXXXXXXXXXXI/XXXXXXXXXXXXX","token_type":"Bearer","issued_at":"XXXXXXXX"}
Response finished
Finished OAuthGetAccessToken
System.Exception: CRM call result is empty or null
at ManagementConsoleJS.Controllers.OAuth2CrmController.OAuth(String state, CrmProcessorFactoryDelegate crmProcessorFactory, IMemoryCache cache)

Any ideas what could be wrong?
 
Hi friends,

The integration between Salesforce and 3CX is failing - can't authorize the token, getting the log below:

Error occured while accessing CRM. Please check log provided.
Started OAuthGetAccessToken
Request text: https://login.salesforce.com/services/oauth2/token
Request form value code set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value grant_type set to authorization_code
Request form value client_id set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value client_secret set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Request form value redirect_uri set to https://XXXXXXXXXXXXXXXX:5001/api/oauth2crm
Request form value state set to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Response text: {"access_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","signature":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","scope":"full","id_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","instance_url":"https://XXXXXXXXXXXXX.my.salesforce.com","id":"https://login.salesforce.com/id/XXXXXXXXXXXI/XXXXXXXXXXXXX","token_type":"Bearer","issued_at":"XXXXXXXX"}
Response finished
Finished OAuthGetAccessToken
System.Exception: CRM call result is empty or null
at ManagementConsoleJS.Controllers.OAuth2CrmController.OAuth(String state, CrmProcessorFactoryDelegate crmProcessorFactory, IMemoryCache cache)

Any ideas what could be wrong?
Have you tried re-signing in on the integration page?
 
This is the first attempt to configure the integration, the 3CX server is on 16.0.9
First of, you should upgrade to v18 and retry using the latest integration template.
 
Thanks, will try it on another server in a few minutes.
I was able to resolve this on both servers - seems that I was missing an important OAuth Scopes ... After adding all of them, the issue is solved. Thanks again for working with me on this.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Forum statistics

Threads
112,147
Messages
590,960
Members
165,167
Latest member
Finatra.us