0

I'm aware there is a very similir here. But this assumes that you are developing a web app on a html fle uploaded to your own server domain. How do I need to set up the Javascript origins in the API project console when I'm working on a Google Site?

enter image description here

My Google Sites URL looks like https://sites.google.com/a/domain-name.com/site-name/page-name. I can't paste that URL since it says that the origin domain can't containt a path like http://example.com/subdir

Here is the error that I'm getting:

  1. That’s an error.

Error: origin_mismatch

Application: Custom form

You can email the developer of this application at: my-email@my-domain.com

Request Details immediate=false response_type=token scope=https://www.googleapis.com/auth/drive.readonly redirect_uri=postmessage proxy=oauth2relay945850002 state=845063282|0.3789568949 origin=https://n-qaqvqexe4f52wy3jge4j7oquqn5qtfw3gn4sumq-script.googleusercontent.com include_granted_scopes=true client_id=498878908299-opvf61qsrpr6en5kvh74esqbmii1nc7u.apps.googleusercontent.com authuser=0

And this is the example code that I'm using

Community
  • 1
  • 1
maeq
  • 1,073
  • 1
  • 12
  • 23
  • have you tried https://sites.google.com? in JavaScript origin? – Linda Lawton - DaImTo May 04 '15 at 12:26
  • The documentation specifies that you should "create new key" of type "browser key" but what you have created is "client ID". Client IDs work based on callbacks or origins while keys work on referrers. – abraham May 07 '15 at 02:21

1 Answers1

0

After wasting lot of hours, adding the URL after ss_domain= to the Authorized JavaScript origins worked for me.

  • From the error windows click on Request Details, look for ss_domain and copy that uri in the JavaScript Origins.
Null Reference
  • 11,260
  • 40
  • 107
  • 184