Code Monkey home page Code Monkey logo

Comments (3)

erickoledadevrel avatar erickoledadevrel commented on June 18, 2024

As per the error message, you appear to be using an invalid API key. Please ensure that you pasted your API key into the code as specified and that it doesn't contain any extra whitespace.

from browser-samples.

MessiDaGod avatar MessiDaGod commented on June 18, 2024

Expected Behavior

Expected to see no errors because I followed all the instructions from the quickstart
Used the correct OAuth 2.0 client ID and the correct API key, even regenerated the API key to see if a new one would work. It didn't.

Actual Behavior

Printed this response upon running localhost

Google Calendar API Quickstart

{
  "error": {
    "errors": [
      {
        "domain": "usageLimits",
        "reason": "keyInvalid",
        "message": "Bad Request"
      }
    ],
    "code": 400,
    "message": "Bad Request"
  }
}

JavaScript Console Output

Failed to load resource: the server responded with a status of 400 ()
Failed to load resource: the server responded with a status of 401 ()

Specifications

  • Browser (Chrome/Internet Explorer/Firefox): Chrome
  • OS (Mac/Linux/Windows): Mac

remove the < and > from the api key and client id

from browser-samples.

ctsstc avatar ctsstc commented on June 18, 2024

I was trying the drive example. It seems I had to create an oAuth client ID and an API Key (rather than using the client secret from the oAuth credentials???)

from browser-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.