0

I have integrated vimeo android api and uploaded video to vimeo using my android app and everytime I get successful message of upload but I need to get the video uri of my video.How can I get that ??

Sanjay Bhalani
  • 2,424
  • 18
  • 44
  • 2
    From the documentation, you need to issue a DELETE on your completion uri in order to get the video uri. https://developer.vimeo.com/api/upload/videos#complete-the-upload Can you please post the code you have written so far? – Kevin Z Aug 30 '16 at 12:03
  • 1
    Thanks Kevin, Now I am trying DELETE request but getting 401 error in response. Can you please help me out. – Sanjay Bhalani Aug 30 '16 at 12:38
  • Without seeing your code I cannot help determine what your issue is. Please post your code. – Kevin Z Aug 30 '16 at 12:40
  • Please add your entire source code for uploading, not just the last part. Also, edit the original question so your source code can be formatted. – Kevin Z Aug 30 '16 at 12:50
  • Can u please share the whole upload process code in vimeo? – Sanjay Bhalani Aug 30 '16 at 12:59
  • I cannot share the entire upload process - the public process is a 4-step process. In the official Vimeo apps we use a 2-step process. We plan on opening this to the public in the future and when we do we will open source an Android library to assist with uploading. Since we do not use the 4-step process we do not have any code that we can share to help you. The best I can do is take your code and run it to see what is happening. Please post your entire upload process - from step 1 through this deletion step. – Kevin Z Aug 30 '16 at 13:22
  • if 2 step process will available for public plz comment for same hear Thank you kevin – Sanjay Bhalani Sep 01 '16 at 05:30
  • Hello Kevin Can we get ticketId to upload videos using unauthenticated access tokens?? – Sanjay Bhalani Sep 06 '16 at 12:31
  • You must use an authenticated access token to upload videos. – Kevin Z Sep 06 '16 at 12:32
  • I followed the documention in vimeo but all in vain ,I don't want user to log in to vimeo account .Can u please guide me or provide me steps how to get authenticated access token so that i can upload videos successfully – Sanjay Bhalani Sep 06 '16 at 13:17
  • Users will need to authenticate in order to upload. See https://github.com/vimeo/vimeo-networking-java#authentication for more details on how to authenticate using the Vimeo Networking library – Kevin Z Sep 06 '16 at 13:21
  • I used authenticateWithClientCredentials() to get access token and used it to get the ticketId but api response gives me 401 error code – Sanjay Bhalani Sep 06 '16 at 13:47
  • A client credentials grant is not what you need - with a client credentials grant the user is not authenticated, only the application (client) is. You need to have the user be authenticated in order for a user to upload videos. You will need an Oauth Code Grant - this allows a Vimeo user to grant your application permission to make user-specific requests on their behalf. – Kevin Z Sep 06 '16 at 13:53
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/122754/discussion-between-sanjay-bhalani-and-kevin-z). – Sanjay Bhalani Sep 06 '16 at 13:59

1 Answers1

-1

Link:api.vimeo.com/users/23550690/tickets/29acf0c117debaf7a944b310a5d7aebe?video_file_id=587909747&upgrade=true&signature=9b1ffcc48c88dd7a4b5bd0f9ab2794b2

URL urls = new URL(url);
                connection = (HttpURLConnection) urls.openConnection();

                connection.setDoOutput(true);
                connection.setRequestProperty(
                        "Content-Type", "application/x-www-form-urlencoded" );
                connection.setRequestMethod("DELETE");


                int responseCode = connection.getResponseCode();

                AppLog.e("Delete","===responseCode==="+responseCode);
                if (responseCode != 401) {
                    InputStream inputStream = connection.getInputStream();
                    if (inputStream != null) {
                        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));

                        String jsons = bufferedReader.readLine();

                        return new Object[]{jsons, requestCode};
                    }
                }
Sanjay Bhalani
  • 2,424
  • 18
  • 44