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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:10:53+00:00 2026-06-14T22:10:53+00:00

I am working on PhoneGap Build API to upload file and create its apk.

  • 0

I am working on PhoneGap Build API to upload file and create its apk. You can check it here https://build.phonegap.com/docs/write_api

I am facing problem in implementing curl using php. The following curl statement on command line is working fine.

$ curl -F file=@/Users/alunny/index.html -u andrew.lunny@nitobi.com -F ‘data={“title”:”API V1 App”,”package”:”com.alunny.apiv1″,”version”:”0.1.0″,”create_method”:”file”}’ https://build.phonegap.com/api/v1/apps

I am getting errors when I try to write this code using php. I have written the following code.

$username = "email";
$password = "password";
$target_url = "https://build.phonegap.com/api/v1/apps";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
$post = array(
        "file"=>"@www.zip",
        "data"=>json_encode(array("title"=>"My Test App","package"=>"com.alunny.apiv1","version"=>"0.1.0","create_method"=>"file"))
    );
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);
curl_close ($ch);

By running this code, I am getting this error “no create_method specified: file, remote_repo, or hosted_repo “

Please help me solving this issue.

Thank you

  • 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-14T22:10:54+00:00Added an answer on June 14, 2026 at 10:10 pm

    Try shell_exec() function:

    $cmd = "https://build.phonegap.com/api/v1/apps";
    $out = shell_exec($cmd);
    $data = json_decode($out);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to build phonegap application using the API give on https://build.phonegap.com/docs/api It requires
I'm trying to run the 'hello world' example from the Phonegap documentation here: http://docs.phonegap.com/en/2.2.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS
So here's my problem. I'm currently working on a PhoneGap application using jQuery Mobile
I am working on a project with dreamweaver CS 6, using the phonegap build
I'm working with PhoneGap/Cordova and the only options I see is to build to
I have developed android phonegap application using phonegap 1.9.0.Its was working fine in android
I originally found Nico's advice https://github.com/nicokruger/android-maven-phonegap/issues/1 as I was browsing to find a maven
I am working in phonegap Camera API new to objective c i dont know
After many and many attempts I can't get the Phonegap + phonegap-plugin-facebook-connect build in
Has anyone integrated Socialize (getsocialize.com) with PhoneGap? I'm working on a PhoneGap app, and

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.