locked
Error when using google api RRS feed

  • Question

  • User-829096311 posted

    Hi

    How can i get json using google api that needs authentication 

    e.g. 

    https://classroom.googleapis.com/v1/courses?courseStates=ACTIVE&key=XXXXXXXXXX

    when i use this url i get this error

    {
      "error": {
        "code": 401,
        "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
        "status": "UNAUTHENTICATED"
      }
    }

    how can i make this url returns a json without error

    Wednesday, October 7, 2020 6:53 AM

Answers

  • User1686398519 posted

    Hi ThisIsYusuf, 

    Google APIs use the OAuth 2.0 protocol for authentication and authorization.You need to use OAuth 2.0 to Access Google APIs.

    You can click here to get: How to acquire client IDs, and how to use it with the Google API Client Library for .NET.

    Best Regards,

    YihuiSun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 8, 2020 6:31 AM

All replies