ios - Cannot Authorise the request to get file's meta-data from Google Drive REST API -


i need file's metadata, referring https://developers.google.com/drive/v2/reference/files/get

this requires fileid have, requires apikey.

i figured out apikey coming gtlservicedrive object, responsible authorisation.

in viewcontroller.h file

@property (nonatomic, strong) gtlservicedrive *service; 

in viewcontroller.m file

- (void)viewcontroller:(gtmoauth2viewcontrollertouch *)viewcontroller   finishedwithauth:(gtmoauth2authentication *)authresult              error:(nserror *)error { if (error != nil) {     [self showalert:@"authentication error" message:error.localizeddescription];     self.service.authorizer = nil; } else {     self.service.authorizer = authresult;     [self dismissviewcontrolleranimated:yes completion:nil];       [self fetchfiles]; } 

}

but self.service.apikey coming nil . therefore, not request

get https://www.googleapis.com/drive/v2/files/{myfileid_string}?key={your_api_key}

any appreciated.

you not need apikey.

what need access token. i've never programmed ios can't help, googling "google oauth ios" should throw resources.


Comments