browser-samples icon indicating copy to clipboard operation
browser-samples copied to clipboard

Drive API Quickstart - "Not a valid origin..." but there's no way to register one

Open RickMohr opened this issue 4 years ago • 0 comments

Following the Drive API JavaScript Quickstart prerequisites I created "Authorization credentials for a desktop application". Loading the sample, the call to gapi.client.init gives this error:

{
  "error": "idpiframe_initialization_failed",
  "details": "Not a valid origin for the client: http://localhost:8000 has not been registered for client ID <snip>. Please go to https://console.developers.google.com/ and register this origin for your project's client ID."
}

But when I go to https://console.cloud.google.com/apis/credentials, the edit screen for my project's client ID contains only a "Name" field, no way to register an origin.

(I tried creating a "web application" instead but local URLs can't be registered.)

RickMohr avatar Nov 01 '21 15:11 RickMohr