Skip to content

Commit bb3f682

Browse files
author
Paulo Ribeiro
authored
doc: Improve information about API tokens (#374)
- Add links to the existing documentation on how to generate project and account API tokens to help keep the information centralized. - Add explicit recommendation to store the tokens in environment variables.
1 parent c43be8d commit bb3f682

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ To run locally the same analysis that Codacy does in your code you can request r
241241

242242
#### Project Token
243243

244-
You can find the project token in:
245-
* `Project -> Settings -> Integrations -> Add Integration -> Project API`
244+
See [how to generate a project token](https://docs.codacy.com/codacy-api/api-tokens/#project-api-tokens).
245+
246+
> ⚠️ **Warning:** For security reasons we recommend that you store your project API token in the environment variable CODACY_PROJECT_TOKEN instead of setting `--project-token`.
246247
247248
```sh
248249
codacy-analysis-cli analyze \
@@ -251,12 +252,11 @@ codacy-analysis-cli analyze \
251252
--directory <SOURCE-CODE-PATH>
252253
```
253254

254-
> In alternative to setting `--project-token` you can define CODACY_PROJECT_TOKEN in the environment.
255-
256255
#### API Token
257256

258-
You can find the project token in:
259-
* `Account -> Access Management`
257+
See [how to generate an account API token](https://docs.codacy.com/codacy-api/api-tokens/#account-api-tokens).
258+
259+
> ⚠️ **Warning:** For security reasons we recommend that you store your account API token in the environment variable CODACY_API_TOKEN instead of setting `--api-token`.
260260
261261
The provider, username, and project name can be retrieved from the URL in Codacy.
262262

@@ -270,8 +270,6 @@ codacy-analysis-cli analyze \
270270
--directory <SOURCE-CODE-PATH>
271271
```
272272

273-
> In alternative to setting `--api-token` you can define CODACY_API_TOKEN in the environment.
274-
275273
## Build
276274

277275
### Compile

0 commit comments

Comments
 (0)