You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the a 401 on my response
I'm executing this from a local node js file. I added http://localhost to the Cross-Origin Resource Sharing (CORS) origins on the dashboard. I've also tried both my secret and public key types. Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
I'm following the documentation found here
I'm attemping to add a category based on the docs. Here is my attempt:
`import 'dotenv/config';
import axios from 'axios';
const url = new URL(
"https://api.chec.io/v1/categories"
);
const headers = {
"X-Authorization":
${process.env.COMMERCE_SECRET}
,"Content-Type": "application/json",
"Accept": "application/json",
};
function postDetails() {
const body = {
slug: 'test slug',
name: 'testCat'
}
}
postDetails();`
I get the a 401 on my response
I'm executing this from a local node js file. I added http://localhost to the Cross-Origin Resource Sharing (CORS) origins on the dashboard. I've also tried both my secret and public key types. Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: