---
url: /en/guide/access-token.md
---
All resources on the Cloud Native Build Platform (including code repositories, artifact repositories, OPENAPI, etc.) require operations to be performed through an access token.

## Creating a Access Token

After logging in, navigate to `Personal Settings` - [Access Token](//cnb.share.ralphlauren.cn/profile/token) -> `Add Access Token`.

The configuration parameters required for the token are as follows:

* Token Name: Unique identifier for the token.
* Expiration Time: Token expiry time; the token becomes unusable after expiration.
* Scope of Use: Token usage scope to restrict access to repository types.
* Authorization Scope: Token authorization scope granting operational permissions under the account.
* Common Scenarios: Provide quick initialization of token authorization scope based on common usage scenarios.

Upon creation, you will obtain the token.

## Token Usage Scenarios

### Accessing Code Repositories

* Username: cnb (fixed)
* Password: The added `Access Token`

### Accessing Artifact Repositories

* Username: cnb (fixed)
* Password: The added `Access Token`

### Accessing OPENAPI

Refer to: [Open API](../develops/openapi.md)

## CI Temporary Tokens

Cloud Native Build pipelines embed temporary tokens (destroyed at the end of the pipeline), obtainable through the environment variable [CNB\_TOKEN](../build/build-in-env.md#CNB_TOKEN).
