Error occured while accessing Salesforce

Status
Not open for further replies.

Sarah B.

Free User
Joined
Mar 12, 2024
Messages
6
Reaction score
0
Hi,

I have set up the 3CX Salesforce integration following this manual: https://www.3cx.com/docs/salesforce-crm-integration/ (including creating a connected app in Salesforce).
When I want to connect with SalesforceV2 integration template, I am transfered to a page where I can login to Salesforce and grant access to 3CX, BUT after that the following error message appears:

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 XXXXXX
Request form value grant_type set to authorization_code
Request form value client_id set to XXXXX
Request form value client_secret set to XXXXXX
Request form value redirect_uri set to https://3cx-hostprofis.at:17001/api/oauth2crm
Request form value state set to ea73b0d2-7541-421f-b12d-cd399b18378f
Response text: {"access_token":"XXXXX","refresh_token":"XXXXX","signature":"XXXXX","scope":"refresh_token web openid api id full","id_token":"XXXXX","instance_url":https://my.salesforce.com,"id":https://login.salesforce.com/id/00D06000001RrK8EAK/0050600000G75sqAAB,"token_type":"Bearer","issued_at":"1710162426745"}
Response finished
Variable Result set to
Finished OAuthGetAccessToken
System.Exception: CRM call result is empty or null
at ManagementConsoleJS.Controllers.OAuth2CrmController.OAuth(String state, CrmProcessorFactoryDelegate crmProcessorFactory, IMemoryCache cache)

(the actual credentials were replaced by XXXX)

That’s why we are currently connected to the “Salesforce” integration template (the older version) and with this the connection seems to be working, as we can find contacts in Salesforce when clicking on “TEST”. Although I assume that this is an outdated integration template because not all functionalities are working in Salesforce (e.g. Call & Chat Journaling).

Does anyone have an advice here?

Thanks a lot,
Sarah
 
Many thanks for the response!

I have configured the app exactly as described in the guide: https://www.3cx.com/docs/salesforce-crm-integration/
What is not described is which checkboxes have to be set in the OAuth Settings. I have activated the following:
1710253828999.png

Are the settings correctly set?

Thank you,
Sarah
 
This is from a working app I have for testing:
1710266261513.png

There are a few checkboxes that you need to clear.
 
  • Like
Reactions: Evolute IT
Unfortunately, there is still the same error message coming up.

Could you let me know which setting you have on that page of the connected app:
1710338091963.png

Thank you!
 
This is how this page looks:
1710356701333.png


Are you using a testing sandbox instead of the production account by any chance?
 
No, I am using the production environment.

I have amended my app settings like yours and tried again but without success. I am still getting the same error code:

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 XXXXXX
Request form value grant_type set to authorization_code
Request form value client_id set to XXXXX
Request form value client_secret set to XXXXXX
Request form value redirect_uri set to https://3cx-hostprofis.at:17001/api/oauth2crm
Request form value state set to ea73b0d2-7541-421f-b12d-cd399b18378f
Response text: {"access_token":"XXXXX","refresh_token":"XXXXX","signature":"XXXXX","scope":"refresh_token web openid api id full","id_token":"XXXXX","instance_url":https://my.salesforce.com,"id":https://login.salesforce.com/id/00D06000001RrK8EAK/0050600000G75sqAAB,"token_type":"Bearer","issued_at":"1710162426745"}
Response finished
Variable Result set to
Finished OAuthGetAccessToken
System.Exception: CRM call result is empty or null
at ManagementConsoleJS.Controllers.OAuth2CrmController.OAuth(String state, CrmProcessorFactoryDelegate crmProcessorFactory, IMemoryCache cache)
 
Status
Not open for further replies.

Forum statistics

Threads
111,973
Messages
590,076
Members
164,895
Latest member
jasonkkrause