HTTP 400 error on triggering a pipeline

I’ve followed the steps described in Trigger pipelines by using the API | GitLab,
got an error when tried to trigger a pipeline:

$ curl -X POST \
     --fail \
     -F token=<token> \
     -F ref=master \
curl: (22) The requested URL returned error: 400

The project is public:

Hi @bam
I am assuming you have created the trigger token as described in the docs. Also you don’t have a master branch on that project, only main branch.


That was it! Didn’t realize auto-generated project uses odd main branch :slight_smile:


I have created Trigger token in project and saved it to CI/CD variables in project A. I’m trying to trigger project B pipeline with following curl. But get error 400

- “curl -X POST --fail -F token=$IAC_TRIGGER_TOKEN -F ref=main

My branch in project B is main. and token is correct. I do not know what could be the issue

@masalep I have the same issue too. Do you manage to solve it?