Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:32:44+00:00 2026-06-14T03:32:44+00:00

This is my code to get the oauth tokens and authorize my app for

  • 0

This is my code to get the oauth tokens and authorize my app for vimeo. This works fine:

WebView webview = new WebView(this);
        webview.getSettings().setJavaScriptEnabled(true);  
        webview.setVisibility(View.VISIBLE);
        setContentView(webview);

        Log.i(TAG, "Retrieving request token from Vimeo servers");

        try {

            final OAuthHmacSigner signer = new OAuthHmacSigner();
            signer.clientSharedSecret = Constants.CONSUMER_SECRET_VIMEO;

            OAuthGetTemporaryToken temporaryToken = new OAuthGetTemporaryToken(Constants.REQUEST_URL_VIMEO);
            temporaryToken.transport = new ApacheHttpTransport();
            temporaryToken.signer = signer;
            temporaryToken.consumerKey = Constants.CONSUMER_KEY_VIMEO;
            temporaryToken.callback = Constants.OAUTH_CALLBACK_URL;
            OAuthCredentialsResponse tempCredentials = temporaryToken.execute();
            signer.tokenSharedSecret = tempCredentials.tokenSecret;

            OAuthAuthorizeTemporaryTokenUrl authorizeUrl = new OAuthAuthorizeTemporaryTokenUrl(Constants.AUTHORIZE_URL_VIMEO);
            authorizeUrl.temporaryToken = tempCredentials.token;
            String authorizationUrl = authorizeUrl.build();
            Log.d("urlop", authorizationUrl);

            /* WebViewClient must be set BEFORE calling loadUrl! */  
            webview.setWebViewClient(new WebViewClient() {  

                @Override  
                public void onPageStarted(WebView view, String url,Bitmap bitmap)  {  
                    System.out.println("onPageStarted : " + url);
                }
                @Override  
                public void onPageFinished(WebView view, String url) 
                {  
                    Log.d("url", url);
                    if (url.startsWith(Constants.OAUTH_CALLBACK_URL)) {
                        try {

                            if (url.indexOf("oauth_token=")!=-1) {

                                String requestToken  = extractParamFromUrl(url,"oauth_token");
                                String verifier= extractParamFromUrl(url,"oauth_verifier");

                                signer.clientSharedSecret = Constants.CONSUMER_SECRET;

                                OAuthGetAccessToken accessToken = new OAuthGetAccessToken(Constants.ACCESS_URL);
                                accessToken.transport = new ApacheHttpTransport();
                                Log.d("abc", "");
                                accessToken.temporaryToken = requestToken;
                                Log.d("abc", accessToken.temporaryToken);
                                accessToken.signer = signer;

                                accessToken.consumerKey = Constants.CONSUMER_KEY;
                                accessToken.verifier = verifier;
                                Log.d("abc", accessToken.verifier);

                                OAuthCredentialsResponse credentials = accessToken.execute();

                                signer.tokenSharedSecret = credentials.tokenSecret;
                                Log.d("abc", signer.tokenSharedSecret);
                                CredentialStore credentialStore = new SharedPreferencesCredentialStore(prefs);
                                credentialStore.write(new String[] {credentials.token,credentials.tokenSecret});
                                view.setVisibility(View.INVISIBLE);
                                performApiCall();
                               // startActivity(new Intent(OAuthAccessTokenActivityVimeo.this,Vimeo.class));
                            } 
                            else if (url.indexOf("error=")!=-1) 
                            {
                                view.setVisibility(View.INVISIBLE);
                                new SharedPreferencesCredentialStore(prefs).clearCredentials();
                                startActivity(new Intent(OAuthAccessTokenActivityVimeo.this,MainMenu.class));
                            }

                        } catch (IOException e) {
                            e.printStackTrace();
                        }

                    }
                    System.out.println("onPageFinished : " + url);

                }
                private String extractParamFromUrl(String url,String paramName) 
                {
                    String queryString = url.substring(url.indexOf("?", 0)+1,url.length());
                    QueryStringParser queryStringParser = new QueryStringParser(queryString);
                    return queryStringParser.getQueryParamValue(paramName);
                }  

            });  

            webview.loadUrl(authorizationUrl);  
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

However, in performApiCall() I need to do this:

String url = String.format("http://vimeo.com/api/rest/v2&format=json&full_response=1&method=vimeo.videos.search&oauth_consumer_key=%s&oauth_nonce=fb86e833df995307290763917343ae19&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1350908218&oauth_version=1.0&per_page=20&query=umar&sort=newest&summary_response=1",
                                            Constants.CONSUMER_KEY

                                            );  

How can I get oauth_nonce, oauth_timestamp and oauth_signature?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:32:45+00:00Added an answer on June 14, 2026 at 3:32 am

    From http://developer.vimeo.com/apis/advanced

    If you’re totally unfamiliar with OAuth, we recommend that you read
    hueniverse’s OAuth 1.0 Guide before you continue. OAuth is
    complicated, and he does a great job of explaining the process.
    Twitter’s guide is also very good.

    Also watch the following resources (may help you)

    • http://developer.vimeo.com/apis/advanced#official-libraries
    • http://developer.vimeo.com/apis/advanced
    • http://vimeoapi.tumblr.com/
    • http://speckyboy.com/2012/10/31/coding-a-vimeo-api-instant-search-app-with-jquery/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i use this code to authorize me with my app https://graph.facebook.com/oauth/authorize?client_id=myappid&scope=publish_stream,offline_access,manage_pages&method=post&redirect_uri=http://www.site.com/indexold.html i get the
just to recap the process: I call https//graph.facebook.com/oauth/authorize?client_id=.. to get a code. This redirects
This code will get us all the properties of a class: Dim myPropertyInfo As
When I run this C code: // Get rid of the CRT and stuff;
I have this code to get the default constructor: Public Function f(ByVal t As
I'm using this code to get the contact list and then I want to
I'm using this code to get a drawable and use in a SetCompoundDrawablesWithIntrinsicBounds call:
I write this code to get Dunnet anova post hoc test import rpy2.robjects as
I am using this code to get the background image of a div .
i have this code to get the search resutls from the api: querygoogle.php: <?php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.