NocoDB
API Headers [May 08]
Discord-Discussions
NocoDB
November 3, 2022, 9:33am
21
wkw
replied
> it seems like nocoDB/Swagger doesnt support axios very well
just had a quick test. it works fine using axios. the data can be inserted into DB and it can be shown in NocoDB UI.
```
let headersList = {
“xc-auth”: “”,
“Content-Type”: “application/json; charset=utf-8”,
Accept: “application/json”,
};
let bodyContent = {
Title: “test”,
Title2: “test2”,
};
let reqOptions = {
headers: headersList,
body: bodyContent,
};
const { data } = axios.post(“<API_URL>”, bodyContent, reqOptions);
```
NocoDB
November 3, 2022, 9:33am
22
wkw
replied
“xc-auth”: “9bYhm5IA6taqBxFyey-K8nRrJeXMZ49JWonriVnu”,
“xc-token”: “9bYhm5IA6taqBxFyey-K8nRrJeXMZ49JWonriVnu”,
1. like o1lab said, u just need either one.
2. just a reminder - the value in your xc-auth is API token, not Auth token. You may take a look at
https://docs.nocodb.com/developer-resources/accessing-apis
to see the differences n how to retrieve it
NocoDB
November 3, 2022, 9:33am
23
Ditmas
replied
Thanks for the answord
NocoDB
November 3, 2022, 9:33am
24
Autogenerated from discord
Join
NocoDB’s
community
Discord
•
Twitter
•
Reddit
•
Docs
← previous page
Related topics
Topic
Replies
Views
Activity
Heroku API [Apr 03]
Discord-Discussions
10
270
November 3, 2022
Code snippets [Sep 17]
Discord-Discussions
20
376
November 3, 2022
Xc-token API key auth issue on create link request
APIs
1
164
April 3, 2024
CORS issue after upgrading [Dec 29]
Discord-Discussions
22
360
November 3, 2022
Unable to create table via APIs [Jun 07]
Discord-Discussions
23
503
November 3, 2022