mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.4 KiB
32 lines
1.4 KiB
3 years ago
|
---
|
||
3 years ago
|
title: 'Accessing APIs'
|
||
3 years ago
|
description: 'How to access NocoDB APIs with Auth or API token?'
|
||
3 years ago
|
---
|
||
|
|
||
3 years ago
|
NocoDB APIs can be authorized by either Auth Token or API Token.
|
||
3 years ago
|
|
||
3 years ago
|
## 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`.
|
||
3 years ago
|
|
||
3 years ago
|
- Go to NocoDB Project, click the rightmost button and click ``Copy Auth Token``.
|
||
2 years ago
|
|
||
1 year ago
|
<img width="357" alt="image" src="https://user-images.githubusercontent.com/35857179/194856397-b2e194e8-5ca1-420e-8b46-e1345d1d91d3.png" />
|
||
3 years ago
|
|
||
|
## API Token
|
||
|
|
||
2 years ago
|
API tokens allows us to integrate seamlessly with 3rd party apps. See [API Tokens Management](../setup-and-usages/team-and-auth#api-tokens-management) for more.
|
||
3 years ago
|
|
||
|
## Swagger UI
|
||
|
|
||
|
You can interact with the API's resources via Swagger UI.
|
||
|
|
||
|
- Go to NocoDB Project, click the rightmost button and click ``Swagger APIs Doc``.
|
||
2 years ago
|
|
||
1 year ago
|
<img width="325" alt="image" src="https://user-images.githubusercontent.com/35857179/194856535-c81bfc2a-8cdd-41aa-8aa6-9c667c972fa4.png" />
|
||
3 years ago
|
|
||
|
- Click ``Authorize``, paste the token you copied in above steps and click `Authorize` to save.
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/164874471-29fc1630-ab99-4c25-8ce2-b41e5415e4be.png)
|
||
|
|