Customer Relationship Module with Salesforce Sandbox Mode (FSB and/or SCDEV)


I am testing out the CRM Link Module with Salesforce in FSB (a salesforce sandbox) however I have been unable to get the API token to successfully save within the CRM Setup page in FreePBX.

When I click on Get Salesforce Token I am redirected to login(dot)salesforce(dot)com and from there I change the URL to test(dot)salesforce(dot)com and login with my sandbox credentials.

This then brings up the authorization request for the sangomacrm connected app I created in the sandbox.

I authorize the app which then redirects me back to the sangomacrm config page URL with &code=(random string here which I believe is the token).

The page however does not fully load and only displays a single text box:

CRM Type

None of the other fields appear until I remove the &code=(random string here) from the URL and refresh the page. Upon refreshing the “Get Salesforce Token” button re-appears and no token has been stored. I checked the asterisk database and found where the settings were stored within the
kvstore_FreePBX_modules_Sangomacrm table however I see no reference to a “Token” key entered in the val column for “salesforcesettings”.

Can the Customer Relationship Module be used with a Salesforce sandbox? If so do I need to manually add the token provided after “code=” in the URL string in the database table and if so where in the json array should I place the token and what key should I use?

Here is a copy of the salesforce module page:

Here is where I change the login URL:

And where I get the auth request:

And what I see when I am redirected back to FreePBX:

Sorry for the multiple posts as it would not allow me to upload more than 1 image per post as I am a new user.

I think maybe not, tho this is a question for Salesforce. See warning on this page:

I thought that may be possible as well but I get all the way through accepting the authorization after logging in. And it appears to grab something for the &code=(random string) part of the URL when its redirected back to FreePBX. I would think that the code= is then pulled in as part of a _GET request and then processed by the server.

I did try this with both the stable build of sangomacrm as well as the edge build with the same results from both module versions.

Module Name: sangomacrm
Module Version:

Submit the page in freepbx before you get the token. Then when you come back to the page in freepbx request the token and it will work

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.