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 7879705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:57:43+00:00 2026-06-03T03:57:43+00:00

i am uploading video to youtube which by default uploads to user who have

  • 0

i am uploading video to youtube which by default uploads to user who have login in google account.

But i want to set that all video should upload using my static gmailID and password

Is it possible to Login in google account directly using static emailid and password ?

Or any other good api or example to upload video in youtube.

Thanks in advance….

  • 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-03T03:57:45+00:00Added an answer on June 3, 2026 at 3:57 am

    I have uploaded youtube video successfully.

    • Record video and upload
    • Videos from sdcard

    by using this

    steps:

    1) Download ytd-android-0.2.tar.gz from this link

    2) Import as an android project.

    3) Replace file: GlsAuthorizer.java with ClientLoginAuthorizer.java

    4) Set Username and password in ClientLoginAuthorizer.java

    5) Register your email id with http://www.appspot.com

    6) Set all values in string.xml file

    7) Run project….. here you go.

    code for ClientLoginAuthorizer.java

    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.UnsupportedEncodingException;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLEncoder;
    
    import android.app.Activity;
    import android.content.Context;
    import android.util.Log;
    
    
    
    
    /**
     * Created by IntelliJ IDEA. User: jarekw Date: Nov 18, 2010 Time: 11:21:36 PM
     * To change this template use File | Settings | File Templates.
     */
    public class ClientLoginAuthorizer implements Authorizer {
        public static final String YOUTUBE_AUTH_TOKEN_TYPE = "youtube";
        private static final String AUTH_URL = "https://www.google.com/accounts/ClientLogin";
        private Context ctx;
        private static final String LOG_TAG = ClientLoginAuthorizer.class
                .getSimpleName();
    
        public ClientLoginAuthorizer(Context context) {
            this.ctx = context;
    
        }
    
        @Override
        public void fetchAccounts(AuthorizationListener<String[]> listener) {
            // not used
    
        }
    
        @Override
        public void addAccount(Activity activity,
                AuthorizationListener<String> listener) {
            // not used
    
        }
    
        @Override
        public void fetchAuthToken(String accountName, Activity activity,
                AuthorizationListener<String> listener) {
            Log.d(LOG_TAG, "Getting " + YOUTUBE_AUTH_TOKEN_TYPE + " authToken for "
                    + accountName);
            try {
                String token = getCLAuthToken(accountName);
                listener.onSuccess(token);
            } catch (Exception e) {
    
                listener.onError(e);
    
            }
        }
    
        @Override
        public String getAuthToken(String accountName) {
            try {
                String token = getCLAuthToken(accountName);
                return token;
            } catch (IOException e) {
    
                e.printStackTrace();
                return null;
    
            }
        }
    
        public String getCLAuthToken(String accountName) throws IOException {
            HttpURLConnection urlConnection = getGDataUrlConnection(AUTH_URL);
            urlConnection.setRequestMethod("POST");
            urlConnection.setDoOutput(true);
            urlConnection.setRequestProperty("Content-Type",
                    "application/x-www-form-urlencoded");
            String template = "Email=%s&Passwd=%s&service=%s&source=%s";
            String userName = "USERNAME"; // TODO
            String password = "PASSWORD"; // TODO
            String service = YOUTUBE_AUTH_TOKEN_TYPE;
            String source = ctx.getString(R.string.client_id);
            String loginData = String.format(template, encode(userName),
                    encode(password), service, source);
            OutputStreamWriter outStreamWriter = new OutputStreamWriter(
                    urlConnection.getOutputStream());
            outStreamWriter.write(loginData);
            outStreamWriter.close();
            int responseCode = urlConnection.getResponseCode();
            if (responseCode != 200) {
                Log.d(LOG_TAG, "Got an error response : " + responseCode + " "
                        + urlConnection.getResponseMessage());
                throw new IOException(urlConnection.getResponseMessage());
            } else {
    
                InputStream is = urlConnection.getInputStream();
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null) {
                    if (line.startsWith("Auth=")) {
                        String split[] = line.split("=");
                        String token = split[1];
                        Log.d(LOG_TAG, "Auth Token : " + token);
                        return token;
                    }
                }
            }
    
            throw new IOException("Could not read response");
    
        }
    
        private String encode(String string) throws UnsupportedEncodingException {
            return URLEncoder.encode(string, "UTF-8");
    
        }
    
        private HttpURLConnection getGDataUrlConnection(String urlString)
                throws IOException {
            URL url = new URL(urlString);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            return connection;
    
        }
    
        @Override
        public String getFreshAuthToken(String accountName, String authToken) {
            return getAuthToken(accountName);
    
        }
    
        public static class ClientLoginAuthorizerFactory implements
                AuthorizerFactory {
            public Authorizer getAuthorizer(Context context, String authTokenType) {
                return new ClientLoginAuthorizer(context);
    
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a web application for video uploading,In that i want to show the
Hi i want to create an uploading video program using youtube api I think
I have completed uploading videos to YouTube from my website, that's for particular user
I am using youtube_it gem for uploading video on youtube.I want to upload videos
I am uploading a video file which is in .mov or .mp4. I want
is there any tutorial for uploling video in youtube using GData API. i want
I am working on a project which involves uploading flash video files to a
I am uploading a stream to server.But my Input-stream contain a big video file.So
I want to upload a video from iPhone to a server somewhere. I have
In android there are final api for uploading video to youtube and any source

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.