0

Getting this exception while running below apps script as Htmlservice.

Reference program i used from below link https://developers.google.com/picker/docs/

Program Name is : "Handling Google Drive Items"

Created Client id and Appkey from google developer console. Still i am getting below exception

401. That’s an error.

Error: invalid_client

no registered origin

Request Details
client_id=562361707913-7unrv3ioupsmuomsc741gfdmh3n4hg97.apps.googleusercontent.com
scope=https://www.googleapis.com/auth/drive
immediate=false
include_granted_scopes=true
proxy=oauth2relay393644742
redirect_uri=postmessage
origin=https://n-bmuwrtqcc3xmmll6ky3orndzuxtebd3mdpptasy-0lu-script.googleusercontent.com
response_type=token
gsiwebsdk=1
state=380226942|0.1134547813
jsh=m;/_/scs/apps-static/_/js/k=oz.gapi.en.WcpMzqgmJZU.O/m=__features__/am=AQ/rt=j/d=1/rs=AGLTcCNsTS1p4dx0iMhlrwEpiaXw4iMjOg
That’s all we know.      
TestUser
  • 45
  • 7
  • 1
    Configure Oauth 2.0 origins according to the answer given here: [oauth2.0-origins](http://stackoverflow.com/questions/19633590/error-invalid-client-no-registered-origin) – Sujay Phadke Feb 10 '17 at 07:14

1 Answers1

3

Try going to your Google Developer Console. Under Credentials go to your oauthclient id and specify the URI Origin in the field provided where you will use it. Also, don't forget to add the uri_redirect ("/oauth2callback").

enter image description here

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56