Phonegap Build API - set build key issue

Bugs will be moved here once resolved.

Post » Thu Jan 26, 2017 2:49 pm

Message: danielemorina can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I would like to start saying 'I don't know much about phonegap'...Said that I am working on automate the build process for my App and I am using Phonegap Build API to do so.
I am using Gulp to manage the different tasks and the issue I am is that I AM NOT ABLE TO SET THE KEY FROM THE API BUT ONLY FOR THE WEBSITE!!
Those are my keys set on the Phonegap Build website:
In my code after the authentication:
Code: Select all
pgBuild.auth({ username: phonegapBuildCredential.username, password: phonegapBuildCredential.password }, authenticationResponse);

Code: Select all
I have the following callback:
    function authenticationResponse(e, api){

     unlockiOSKeyMethod(api); + '/build', options, function(ee, data) {
    if(data != null && !ee){
      var buildStatus = data.completed;
      if(buildStatus) {


and also 2 function to unlock/update the keys, here is one:
Code: Select all
function unlockiOSKeyMethod(api){
  var unlockiOSKeyForm = {
    form: {
      data: {
        password: 'passwd1234'
  var iOSkeyID = (buildForProduction) ? '637072' : '638123';

  api.put('/keys/ios/' + iOSkeyID, unlockiOSKeyForm);

I have read somewhere that I should specify the wanted key before sending it to the build server, so I have tried to add property to the 'options' passed to the Build service but it didn't work.

For instance, something like this:
Code: Select all
var options = {
       form: {
         data: {
           platforms: ['android', 'ios'],
           key: {
             ios: keyid
       file: './www/'

Also IF I change the keys from the Phonegap Build website, as soon as I run my script it builds whatever is selected on the website.

enter image description here Please let me know if you need any further information to get me some help :) Thanks
Posts: 1
Reputation: 152

Post » Tue Apr 18, 2017 11:30 am

This is not a bug report for C2, please contact PhoneGap Build support if you need help with their service.
Scirra Founder
Posts: 25,073
Reputation: 199,682

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests