--- title: 'Accessing APIs' description: 'How to access NocoDB APIs with Auth or API token?' --- 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 on `Nocodb` on top left, ``Copy Auth Token``. ![copy auth token](https://github.com/nocodb/nocodb/assets/86527202/d7e2810b-4268-43b3-8163-dfe1541fbf68) ## API Token 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. ## Swagger UI You can interact with the API's resources via Swagger UI. - Open project context menu, select ``Swagger: REST APIs``. ![swagger](https://github.com/nocodb/nocodb/assets/86527202/218f1286-775b-466b-b6d1-f8bd9c74f9ee) - 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)