Only the authenticated owner can request for private albums (i.e. make use of "access=private") Are you sure you are authenticated as user "[email protected]" when issuing the request? Is there an error message in the body of your response?
On Fri, Feb 25, 2011 at 12:46 PM, skonno <[email protected]> wrote: > Hi, > > I recently noticed that the following code for iOS can't get private > entries with client login. > > NSMutableString *feedUrl = [NSMutableString string]; > [feedUrl appendString:@"https://picasaweb.google.com/data/feed/api/ > user/"]; > [feedUrl appendString:[self email]]; > NSURL *url = [NSURL URLWithString:feedUrl]; > NSMutableURLRequest *request = [NSMutableURLRequest > requestWithURL:url]; > [request setHTTPMethod:@"GET"]; > [request setValue:[self authToken] > forHTTPHeaderField:@"Authorization"]; > > I can get the authorization token normally, and the code could get > private entries > about two years ago. However it can get only public entries today. > > I added the following header, but the response is same. > > [request setValue:@"2" forHTTPHeaderField:@"GData-Version"]; > > I found to return 403 status code when I add a following parameter of > the visibility. > > GET /data/feed/api/user/[email protected]? > kind=album&access=private HTTP/1.1 > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 > OpenSSL/0.9.8l zlib/1.2.3 > Host: picasaweb.google.com > Accept: */* > Authorization: GoogleLogin auth=xxxxxx > GData-Version: 2 > > HTTP/1.1 403 Forbidden > Expires: Fri, 25 Feb 2011 20:07:42 GMT > Date: Fri, 25 Feb 2011 20:07:42 GMT > Cache-Control: private, max-age=0, must-revalidate > Set-Cookie: _rtok=rKQ88fv6hXzi; Path=/; Secure; HttpOnly > Set-Cookie: S=photos_html=-qYv1qtJYr6Of5Eu0I0q7w; > Domain=.google.com; Path=/; Secure; HttpOnly > Content-Type: text/html; charset=UTF-8 > X-Content-Type-Options: nosniff > X-Frame-Options: SAMEORIGIN > X-XSS-Protection: 1; mode=block > Server: GSE > Transfer-Encoding: chunked > > Please tell me if the API is added some changes from two years ago ? > > Best Regards, > > Satoshi Konno > > -- > You received this message because you are subscribed to the Google Groups > "Google Picasa Web Albums API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-picasa-data-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-picasa-data-api?hl=en.
