ios中的Google API错误

ios中的Google API错误,ios,iphone,objective-c,api,google-api,Ios,Iphone,Objective C,Api,Google Api,我正在尝试通过谷歌API获取用户信息。但是 我犯了以下错误 error: { errors: [ { domain: "usageLimits", reason: "accessNotConfigured", message: "Access Not Configured. Please use Google Developers Console to activate the API for your project." } ],

我正在尝试通过谷歌API获取用户信息。但是 我犯了以下错误

   error: {
    errors: [
    {
    domain: "usageLimits",
    reason: "accessNotConfigured",
    message: "Access Not Configured. Please use Google Developers Console to activate the API for your project."
    }
    ],
    code: 403,
    message: "Access Not Configured. Please use Google Developers Console to activate the API for your project."
    }
    }
我的代码如下:

-(void)get_real_profile:(NSString*)userid
{
    // POST parameters
    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.googleapis.com/plus/v1/people/%@?key=xxxxxxxxxxxxxxxxx",userid]];
    NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url];
    [urlRequest setHTTPMethod:@"GET"];
    [urlRequest setValue:userid forHTTPHeaderField:@"userId"];
    [NSURLConnection sendAsynchronousRequest:urlRequest
                                       queue:[NSOperationQueue mainQueue]
                           completionHandler:^(NSURLResponse *response,
                                               NSData *data,
                                               NSError *connectionError) {

                               NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
                               NSLog(@"%@",json);
                           }];
}
我无法启用此应用的计费。那么,是否存在有关禁用计费的任何问题。

帮我解决这个问题。

谢谢,

  • 登录‎
  • 单击
    api和Auth
  • 启用要访问的相关API
  • 确保您正在为从代码访问的项目启用它。活动项目显示在
    概述
    链接上方