Integrating OAuth with Vimeo using Scribe

I was able to successfully get the access token from Vimeo using the Scribe API.

However, when I try to access a protected resource, I get an invalid signature error. My OAuthService, which I use to check access to a protected resource, looks like this:

OAuthService service = new ServiceBuilder()
    .provider(VimeoApi.class)
    .apiKey(APIKEY)
    .apiSecret(API_SECRET)
    .signatureType(SignatureType.QueryString)
    .build();

Then I make a request doing the following:

  OAuthRequest orequest = new OAuthRequest(Verb.GET, "http://vimeo.com/api/rest/v2");
  orequest.addBodyParameter("method", "vimeo.videos.upload.getQuota");

This fails and reports that the signature is not valid.

+5
source share
1 answer

The problem is

  orequest.addBodyParameter("method", "vimeo.videos.upload.getQuota");

Scribe , . , GET method , , . , Vimeo , Scribe.

GET, ,

  orequest.addQuerystringParameter("method", "vimeo.videos.upload.getQuota");

, :

  OAuthRequest orequest = new OAuthRequest(Verb.POST, "http://vimeo.com/api/rest/v2");
  orequest.addBodyParameter("method", "vimeo.videos.upload.getQuota");
+3

All Articles