I am using google cloud uploader (https://developers.google.com/storage/docs/json_api/v1/how-tos/upload) API to upload image from IOS.
I have below code.For REST Manager I am using code from here https://github.com/SSamanta/SSRestClient
+(void)uploadData:(NSData *)data withName:(NSString *)name onCompletion:(ServiceCompletionHandler)handler {
SSRestManager *restManager = [[SSRestManager alloc] init];
restManager.httpMethod = @"POST";
restManager.contentType = @"image/jpeg";
restManager.contentLength = [NSString stringWithFormat:@"%i",data.length];
restManager.httpBody = data;
NSString *urlString = [NSString stringWithFormat:@"https://www.googleapis.com/upload/storage/v1beta2/b/videosbetas/o?uploadType=media&name=myObject&key=%@",kAPIKey];
[restManager getHttpResponseWithBaseUrl:urlString onCompletion:^(id responseData, NSURLResponse *reponse) {
if (responseData) {
handler (responseData,nil);
}
} onError:^(NSError *error) {
handler(nil,error);
}];
}
I am receiving below error message from google cloud storage api. I have followed all the instructions to configure app in google developer console.
{
"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."
}
Can any one help me?