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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:35:49+00:00 2026-05-31T18:35:49+00:00

Can anyone here help me with the integration of the DailyMotion API? I am

  • 0

Can anyone here help me with the integration of the DailyMotion API? I am using their SDK but to no avail, and forums are also not helping much.

  • 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-05-31T18:35:51+00:00Added an answer on May 31, 2026 at 6:35 pm

    I tried using the DailyMotion SDK. It worked very well but later on for some reason I was told not to use SDKs. So here is the PHP code to use the API using cURL.

    define("DAILYMOTION_API_KEY", "xyzzz");
    define("DAILYMOTION_API_SECRET_KEY", "abcc");
    $testUser = "username";
    $testPassword = "pwd";
    $url = 'https://api.dailymotion.com/oauth/token';
    $testVideoFile = "<file location>";
    $vidName = "testing video";
    $vidDesc = "this is a test";
    /* GET ACCESS TOKEN */
    try {
    $data = "grant_type=password&client_id=" . DAILYMOTION_API_KEY . "&client_secret=" .      DAILYMOTION_API_SECRET_KEY . "&username=abs&password=pwd&scope=read+write";
    $curlInit = curl_init($url);
    curl_setopt($curlInit, CURLOPT_POST, 1);
    curl_setopt($curlInit, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, 1);
    $output = curl_exec($curlInit);
    curl_close($curlInit);
    $res = json_decode($output);
    $accessToken = $res->access_token;
    $getUploadUrl = "curl -d 'access_token=$accessToken' -G  https://api.dailymotion.com/file/upload/";
    $uploadUrl = json_decode(system($getUploadUrl));
    $postFileCmd = "curl -F 'file=@$testVideoFile'" . ' "' . $uploadUrl->upload_url . '"';
    $postFileResponse = json_decode(system($postFileCmd));
    
    $postVideoCmd = "curl -d 'access_token=$accessToken&url=$postFileResponse->url' https://api.dailymotion.com/me/videos";
    
    $postVideoResponse = json_decode(system($postVideoCmd));
    $videoId = $postVideoResponse->id;
    
    $publishCmd = "curl -F 'access_token=$accessToken' \
     -F 'title=$vidName' \
     -F 'published=true' \
     -F 'description=this is a test' \
     https://api.dailymotion.com/video/$videoId";
    
     $publishres = system($publishCmd);
     print_r($publishres);
     echo "Video is posted & published Successfully";
     } catch (Exception $e) {
     print_r($e);
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me understand what is going on here? Jenkins has been working
Can anyone help out with what im doing wrong here? DEMO HTML <div id=usercurrentccbox>
Can anyone please help. I'm following a tutorial found here as I have a
Can anyone tell why my jQuery script is not loading here <?php wp_enqueue_script(jquery); ?>
I am wondering if anyone here can help me with some pseudocode or at
I am in way over my head, and am hoping anyone here can help.
Can anyone help me with this error? alt text http://abbeylegal.com/downloads/parsererror.jpg full image here It
I'm new here and I hope anyonte can help me. I have WCF Service
Can anyone explain why here a = [] ? 1 : 2 a will
Can anyone tell me what is happenning here? I am getting duplicated session ID's

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.