Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Add new param to users.generatePersonalAccessToken REST endpoint (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Mar 19, 2020
1 parent dbda21d commit 9df42d5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Generate Personal Access Token. Requires `create-personal-access-tokens` permiss
| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `tokenName` | `mypersonaltoken` | Required | The name of the token. |
| `bypassTwoFactor` | `true` or `false` | Optional, default: `false` | If 2FA requirement should be ignored when using this token. |

## Example Call

Expand All @@ -19,7 +20,7 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type:application/json" \
http://localhost:3000/api/v1/users.generatePersonalAccessToken \
-d '{ "tokenName": "mypersonaltoken" }'
-d '{ "tokenName": "mypersonaltoken", "bypassTwoFactor": true }'
```

## Example Result
Expand All @@ -35,4 +36,5 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \

| Version | Description |
| :--- | :--- |
| 3.1.0 | Added `bypassTwoFactor` param |
| 0.69.0 | Added |

0 comments on commit 9df42d5

Please sign in to comment.