Google Apps Script, OAuth2, and Salesforce

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

Google Apps Script, OAuth2, and Salesforce



I am trying to get this demo working: Google Apps Script / Salesforce.com



I have watched the linked video several times, searched and search for hours for a solution, but I continue to get the same error as others:




error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration



Questions:
1) Do we still need to change the callback url from "script" to "docs" when the using a script bound to a spreadsheet? I have tried it both ways.



2)Do I need to change endpoint urls because of my salesforce having a custom domain in the form of mycompany.cloudforce.com ?



Thank you in advance for your help.





Can you show me your redirect URI? It looks something like 'localhost:8080/oauth2callback'; (when testing locally) in your Google Dev Console.
– noogui
yesterday





That code and video are a bit old, not sure if everything still works there. You might want to try this sample instead: github.com/gsuitedevs/apps-script-oauth2/blob/master/samples/…
– Eric Koleda
16 hours ago





So I opened the Developer Tools in Chrome, went to the Console tab, ran the code, got the error message mentioned previously, and what I got was "Failed to load resource: the server responded with a status of 400 (Bad Request)" along with a link: login.salesforce.com/services/oauth2/… (replaced my info with XXX)
– Jason Phillips
13 hours ago






Eric, I also tried that code, and received the same exact error.
– Jason Phillips
12 hours ago





the gsuitedevs code gives me this URL login.salesforce.com/services/oauth2/…
– Jason Phillips
12 hours ago




1 Answer
1



Success! I was able to successfully get past this hurdle...got to the login page.



the function




logRedirectUri()



in the gsuitedevs code gsave me the correct callback URI






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Trying to Print Gridster Items to PDF without overlapping contents