Skip to content

Commit fbd4cb9

Browse files
authored
distinguish between different API tokens (circleci#2423)
1 parent f6202b8 commit fbd4cb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jekyll/_cci2/api-job-trigger.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ how to trigger the `deploy_docker` job
2626
by using `curl`.
2727

2828
```bash
29-
curl -u ${CIRCLE_API_TOKEN}: \
29+
curl -u ${CIRCLE_API_USER_TOKEN}: \
3030
-d build_parameters[CIRCLE_JOB]=deploy_docker \
3131
https://circleci.com/api/v1.1/project/<vcs-type>/<org>/<repo>/tree/<branch>
3232
```
3333

3434
Some notes on the variables
3535
used in this example:
36-
- `CIRCLE_API_TOKEN` is a [personal API token]({{ site.baseurl }}/2.0/managing-api-tokens/#creating-a-personal-api-token).
36+
- `CIRCLE_API_USER_TOKEN` is a [personal API token]({{ site.baseurl }}/2.0/managing-api-tokens/#creating-a-personal-api-token).
3737
- `<vcs-type>` is a placeholder variable
3838
and refers to your chosen VCS (either `github` or `bitbucket`).
3939
- `<org>` is a placeholder variable
@@ -82,7 +82,7 @@ jobs:
8282
command: |
8383
# replace this with your build/deploy check (i.e. current branch is "release")
8484
if [[ true ]]; then
85-
curl --user ${CIRCLE_API_TOKEN}: \
85+
curl --user ${CIRCLE_API_PROJECT_TOKEN}: \
8686
--data build_parameters[CIRCLE_JOB]=deploy_docker \
8787
--data revision=$CIRCLE_SHA1 \
8888
https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/$CIRCLE_BRANCH

0 commit comments

Comments
 (0)