0

Please check http://www.udayan2k12.com/trial.html

I have just copied the source from Google link (Source)
Original Page link
I have changed the client id and api key
Still this is not working

My Cliend ID details are ![enter image description here][1]

Client ID: 365219651081-istfrdgsvrtj324sufau0ldi5e8b3fmk.apps.googleusercontent.com
Email address: 365219651081-istfrdgsvrtj324sufau0ldi5e8b3fmk@developer.gserviceaccount.com
Client secret: --
Redirect URIs: none
JavaScript origins: https://www[dot]udayan2k12[dot]com
API key: AIzaSyA0FVy-lEr_MPGk1p_lHSrxGZDcxy6wH4o

What Changes shall i do to make it work. The Authorize button doesn't work.

But it works in http://udayan2k12[dot]com/token.html

1 Answer 1

2

If you check the error console you'll see that you get the following error:

Failed to load resource: the server responded with a status of 400 (Bad Request) https://accounts.google.com/o/oauth2/auth?client_id=365219651081-istfrdgsvrtj324sufau0ldi5e8b3fmk.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffusiontables&immediate=true&redirect_uri=postmessage&origin=http%3A%2F%2Fwww.udayan2k12.com&proxy=oauth2relay665167919&response_type=token&state=225646027&authuser=0

And when you follow the link, the error message you get is: origin_mismatch

This means you did not add http://udayan2k12.com (and not https) to the allowed JavaScript origins for your client id. You can change that on the Google API Console (Tab "API Access"). You could add localhost as well so it works on you machine, too.

Here is an example of my settings:

My client id settings

Please check the OAuth 2.0 guide from Google for all the steps you need.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks u r a lifesaver :-) i was using https instead of http :0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.