code: @SuppressWarnings("boxing")
      public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) {
          OAuth10aService service = new ServiceBuilder(apiKey)
                  .apiSecret(sharedSecret)
                  .build(FlickrApi.instance());
  
          // Flickr seems to return invalid token sometimes so retry a few times.
          // See http://www.flickr.com/groups/api/discuss/72157628028927244/
          OAuth1Token accessToken = null;
          boolean success = false;
          for (int i = 0; i < maxGetTokenRetries && !success; i++) {
              try {
                  accessToken = service.getAccessToken(oAuthRequestToken, verifier);
                  success = true;
              } catch (OAuthException | IOException | InterruptedException | ExecutionException e) {
                  if (i == maxGetTokenRetries - 1) {
                      logger.error(String.format("OAuthService.getAccessToken failing after %d tries, re-throwing exception", i), e);
                      throw new FlickrRuntimeException(e);
                  } else {
                      logger.warn(String.format("OAuthService.getAccessToken failed, try number %d: %s", i, e.getMessage()));
                      try {
                          Thread.sleep(500);
                      } catch (InterruptedException ie) {
                          // Do nothing
                      }
                  }
              }
          }
  
          return accessToken;
      }
docs: Trade the request token for an access token, this is step three of authorization.
  @param oAuthRequestToken
  this is the token returned by the {@link AuthInterface#getRequestToken} call.
  @param verifier