# Create a personal access token **POST /api/my-account/personal-access-tokens** Create a personal access token for the signed-in user. A logto-verification-id in header and the personal-access-tokens scope are required. The token secret value is returned only in this response. The expiration time is required, must be in the future, and must be at most 365 days from now. A user can have at most 20 unexpired personal access tokens. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Body: application/json (object) - **name** (string) The name of the token. It must be unique among the user's personal access tokens. - **expiresAt** (number) The epoch time in milliseconds when the token expires. It must be in the future and at most 365 days from now. ## Responses ### 201 The personal access token was created successfully. The response includes the token secret value, which cannot be retrieved again. #### Body: application/json (object) - **name** (string) - **createdAt** (number) - **expiresAt** (number | null) - **value** (string) ### 400 The request body is invalid, the personal access token field is not editable in the account center, or the expiration time is not in the future or more than 365 days from now. ### 401 Permission denied, the verification record is invalid or the access token does not include the personal-access-tokens scope. ### 403 The request was made by a third-party application. ### 422 The token name already exists, or the user has reached the maximum number of unexpired personal access tokens. [Powered by Bump.sh](https://bump.sh)