How to call https://www.googleapis.com/plus/v1/people/me at google

前端 未结 6 2241
感情败类
感情败类 2020-12-28 23:04

I am developing an Android application and need to get the \"me\" info from google but I always ends up in either response code 401 or 403. What am I doing wrong? Here is my

6条回答
  •  粉色の甜心
    2020-12-28 23:15

    The issue is regarding the simple api key passed into the request.

    If the key parameter isn't included in the request, or if the Google+ API wasn't activated for that project, you'll get the error: "Daily limit exceeded. Please sign up".

    To solve this problem, you need to do the following:

    • Visit the Google API Console here: https://code.google.com/apis/console/?api=plus
    • Under the Services panel, make sure the Google+ API is turned "on".
    • In the APIs console, click API Access in the left menu.
    • Copy the API key presented towards the bottom.
    • Include this API key in your HTTP request.
    GOOGLE_ME_URL + "?access_token=" + authToken + "&key=" + MY_SIMPLE_API_KEY
    

提交回复
热议问题