Create Releases API doesn't work via Integrations



On this page, the Create a Release API is listed as supported for integrations, but I can’t get it to work.

The HTTP request I’m doing is as follows (with a proper token subsituted in the auth header):

curl -X POST "" \
  -H "Authorization: token <substitute_token_here>" \
  -H "Accept: application/vnd.github.machine-man-preview+json" \
  -H "Content-Type: application/json" \
  -d '{ "tag_name": "1.0.0", "target_commitish": "master", "name": "1.0.0" }'

When authed as an integration with read/write permissions on everything, the error I get is:

403 Unprocessable Entity
    "message": "Validation Failed",
    "errors": [
            "resource": "Release",
            "code": "custom",
            "field": "author_id",
            "message": "author_id does not have push access to ndhoule/test_repository"
    "documentation_url": ""

When using a token authed on behalf of a user (who definitely has write access to this repository), the error I get is:

403 Forbidden
    "message": "Tokens on behalf of a user are not supported for this API",
    "documentation_url": ""

Is this API simply unsupported, or am I doing something wrong?

Authentication on uploading release assets

Update: I just double-checked the releases for this repository and oddly enough, when performing this action as an integration (despite the error) it still creates a release on the repository.

So it seems like either an integration is not supposed to be able to do this and there’s an authorization failure, or a weird auth check is superficially signaling an error (but still allowing the API call).


Hi @ndhoule

This is a bug on our side that I am looking into, thanks for the report!


@ndhoule We’ve shipped a fix for this, and the Releases API should now be working as expected. Let us know if you’re still seeing any issues.

Thanks again for the report.


Confirming that this fixes the issue. Thanks!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.