Trouble triggering build via API on v1.1 (noscript response)

Attempting to trigger a build with curl as explained in the docs (https://circleci.com/docs/api/v1-reference/#new-build), but I can’t get this to work. Every time I try to use the example (tailored to my username/project), I get a noscript response from CircleCI. Can someone point me in the right direction?

Would you expand on this? What is the the response that you get?

This forum software stripped my angle bracketed noscript tag. I get a noscript response from CircleCI. Here’s a gist with a scrubbed command and the noscript page that’s returned: https://gist.github.com/mfestrada/1d66916db6bc10cc5885498994108eca

Also, there’s conflicting documentation from CircleCI on how to do this, and I’m getting the same response from both examples.

Documentation reference #1:
https://circleci.com/docs/2.0/api-job-trigger/

Documentation reference #2:
https://circleci.com/docs/api/v1-reference/#new-build

I’ve even replaced my token with ‘foo’, and get the noscript message which means that I’m not really authenticating. However, I’m doing everything the docs are instructing to do. Very confused, this should be straightforward but isn’t.

Discourse uses the very popular Markdown format. For code blocks, use two lots of triple-backticks to enclose your code, or indent the whole lot with four spaces. You can simply select the block and click on the </> code tag in the editor.

Noted. Here’s what was in the gist I linked to:

curl -v -X POST https://circleci.com/api/v1.1/project/gh/[my_gh_organization]/[the_project_name]?circle-token=[token_from_circleci_project_settings]

FWIW in case anybody had the same issue and finds this thread, the path in the URL was incorrect. Instead of gh, it needed to be github. The first documentation reference I listed in the original post explained this.

1 Like

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