title: AFNetworking HTTP request to Evernote API on iOS: error code 403
body: <p>I am developing an iOS app that uses the Evernote API. Everything has been working fine, but then I started getting "code 403" to my requests.</p>
  
  <p>Authentication to the service goes well: I am able log on and download all info I need (Notebooks, Notes, Note content, etc...). But when I try to get the thumbnails, I get 403.</p>
  
  <p>My code for the request:</p>
  
  <pre><code>NSString *thumbnailPath = [NSString stringWithFormat:@"%@thm/note/%@?75", [[EvernoteSession sharedSession] webApiUrlPrefix], note.guid];
  NSLog(@"THUMBNAILPATH %@", thumbnailPath);
  
  AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:[[EvernoteSession sharedSession] webApiUrlPrefix]]];
  [httpClient clearAuthorizationHeader];
  [httpClient setAuthorizationHeaderWithToken:[[EvernoteSession sharedSession] authenticationToken]];
  
  [httpClient postPath:thumbnailPath parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
  
      note.thumbnail = responseObject;
  } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
      NSLog(@"REQUEST: %@", thumbnailPath);
      NSLog(@"Error: %@", error.localizedDescription);
  }];
  </code></pre>
  
  <p>If I copy what the "REQUEST:" log result, it is a well-formatted link that gives me the thumbnail in my browser. But the second log gives me: "Error: Expected status code in (200-299), got 403".</p>
  
  <p>I am out of ideas. Can anyone help?</p>