Skip to content

Commit 6650476

Browse files
6543noerw
andauthored
Apply suggestions from code review
Co-authored-by: Norwin <[email protected]>
1 parent c8d9244 commit 6650476

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/content/doc/developers/api-usage.en-us.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ $ curl --request GET --url https://yourusername:[email protected]/api/v1/
6363
[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}]
6464
```
6565
66-
As of v1.8.0 of Gitea, if using basic authentication with the API and
66+
To use the API with basic authentication with two factor authentication
67+
enabled, you'll need to send an additional header that contains the one
68+
time password (6 digitrotating token).
69+
An example of the header is `X-Gitea-OTP: 123456` where `123456`
70+
is where you'd place the code from your authenticator.
71+
Here is how the request would look like in curl:
6772
your user has two factor authentication enabled, you'll need to send
6873
an additional header that contains the one time password (6 digit
6974
rotating token). An example of the header is `X-Gitea-OTP: 123456`

0 commit comments

Comments
 (0)