Trigger a new Build by Project (preview) fails when using a project API token

I’ve enabled the preview feature in my projects settings. I’ve created a new api key in the project, with ‘all’ permissions.

When trying to trigger the project via:
curl -X POST --header “Content-Type: application/json” -d ‘{“branch”:“develop”}’ “”

… it fails with {“message”:“An internal server error occurred.”}

However, if I try the same thing with a personal api token generated on my user account page, it works fine. Is this intended? Seems like both should work equally well imo.

Right now project tokens are read only tokens, so we don’t honor them for anything that would mutate or add information. See the docs here for an explanation: