Hi,
I manage to get my assets list with axios and react like this.
try {
const resp = await axios.get('https://api.cesium.com/v1/assets', {
headers: {
'authorization': `Bearer ${accessToken}`
},
json: true
});
console.log(resp.data);
} catch (err) {
// Handle Error Here
console.error(err);
}
My problem is when I want to create my assets, I get a 401.
try {
const resp = await axios.post('https://api.cesium.com/v1/assets', {
headers: {
'authorization': `Bearer ${accessToken}`
},
json: true,
body: postBody
});
console.log(resp.data);
} catch (err) {
// Handle Error Here
console.error(err);
}
the access Token I’m using is set to : assets:list, assets:read, assets:write, geocode, profile:read, tokens:read, tokens:write
So I should be able to creat the asset.
What am I doing wrong ?
Thanks