Authentication on uploading release assets


I have been unable to successfully upload release assets with integrations. I know my authentication token creation works as I can create new issues with labels, which should require the same permission as uploading assets.

The code I’m building with is nodejs with superagent. The previous code using user oauth code worked without an issue.

Here is the relevant function:

 * postFile
 * Creates a file for a release asset
 * NOTE: uploading uses a different domain than the regular API
 * @see
 * @param {String} owner - GitHub owner
 * @param {String} repo - GitHub repository
 * @param {Number} release - GitHub release ID to publish to
 * @param {String} token - token for GitHub authentication
 * @param {Object} file - file to upload to GitHub
 * @param {String} - name of file on github
 * @param {String} [file.label] - special label to put next to title on GitHub
 * @param {String} file.path - full path to file that should be uploaded
 * @returns {Number} - GitHub asset number
export async function postFile (owner, repo, release, token, file) {
  const filePath = file.path
  delete file.path

  return api
  .set('Authorization', `token ${token}`)
  .attach('file', filePath,
  .then((res) =>
  .catch((err, res) => {
    throw errorCheck(err, res, 'postFile', `${owner}/${repo}#${release}`)

Using Postman I receive this error, which seems similar to this issue:

  "message": "Validation Failed",
  "request_id": "4402AB8A:66A8:3B99185:5806BEF5",
  "documentation_url": "",
  "errors": [
      "resource": "ReleaseAsset",
      "code": "custom",
      "field": "uploader_id",
      "message": "uploader_id does not have push access to btkostner/vocal"


Thanks for the report, @btkostner – we’ll take a look and post an update here once we have more news.


Hi @btkostner, we just fixed a bug around this. You should be good to go now. Let us know how you get on, thanks!