mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-04 07:56:59 +00:00
docs: api tokens
Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
This commit is contained in:
@@ -6,14 +6,14 @@ category: 'Developer Resources'
|
||||
menuTitle: 'Accessing APIs'
|
||||
---
|
||||
|
||||
## REST APIs
|
||||
NocoDB APIs can be authorized by either Auth Token or API Token.
|
||||
|
||||
## Auth Token
|
||||
|
||||
Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable `NC_JWT_EXPIRES_IN`. If you are passing Auth Token, make sure that the header is called `xc-auth`.
|
||||
|
||||
- Go to NocoDB Project, click the rightmost button and click ``Copy Auth Token``.
|
||||
|
||||
<alert>
|
||||
Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable NC_JWT_EXPIRES_IN. If you are passing Auth Token, make sure that the header is called xc-auth.
|
||||
</alert>
|
||||
|
||||

|
||||
|
||||
- Click the same button and click ``Swagger APIs Doc``.
|
||||
@@ -28,4 +28,25 @@ Auth Token is a JWT Token generated based on the logged-in user. By default, the
|
||||
|
||||
- Paste the token you just copy in step 1 and click Authorize
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## API Token
|
||||
|
||||
NocoDB allows creating API tokens which allow it to be integrated seamlessly with 3rd party apps. API Token is a Nano ID with a length of 40. If you are passing API Token, make sure that the header is called `xc-token`.
|
||||
|
||||
|
||||
- Go to `Team & Settings` from the left navigation drawer
|
||||

|
||||
|
||||
- Click `API Tokens Management`
|
||||

|
||||
|
||||
- Click Add New Token
|
||||

|
||||
|
||||
- Type an recognizable name for your token and click `Generate`
|
||||

|
||||
|
||||
- Copy API token to your clipboard
|
||||

|
||||
Reference in New Issue
Block a user