Google API: Not a valid origin for the client: url has not been whitelisted for client ID “ID”

前端 未结 17 1466
北海茫月
北海茫月 2020-12-23 14:34

I need help. I don\'t found an answer to my question. I tried googling and I tried asking on other sides but I never found an answer.

I\'m working with the google API

17条回答
  •  有刺的猬
    2020-12-23 14:42

    I was also attempting to get the sample working (from ) https://developers.google.com/drive/api/v3/quickstart/js

    It continually failed even though the ip address was added to the WebAPI.

    But you have to add localhost:8000 (not just 127.0.0.1:8000) to your OAUTH as shown here:

    Float over the OAUTH client text and it will become a link. Click that link and you can add a URI including the port. Mine already had 127.0.0.1:8000 but not the locahost:8000.

    Here's the interesting / odd thing. When I ping localhost I see:

    I think that is IPV6 thing.

    Anyways, if I ping 127.0.0.1 I see the expected response (via IPV4)

    Maybe that is a red herring but I wasn't sure if the value entered in the OAUTH was affected by it or not.

    The reason I even noticed that is because when I started the Python web server as directed in the tutorial I saw the following and thought it was odd:

    Only after adding the localhost:8000 URI in the OAUTH did it work, but after adding it did work fine.

提交回复
热议问题