Update API Keys and fix frontend bugs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const axios = require('axios');
|
||||
const API_KEY = 'sk-cKf0TV79X6Fp3CZwKfsnHv1Rq9GOK6nFCAXyDG9CvnIFKGYiTtSdOnjyadBaYc5y';
|
||||
const baseUrl = 'https://yce-api-01.makeupar.com/s2s/v2.0';
|
||||
const initPayload = {
|
||||
files: [
|
||||
{ content_type: 'image/jpeg', file_name: 'test.jpg', file_size: 100000 }
|
||||
]
|
||||
};
|
||||
axios.post(`${baseUrl}/file`, initPayload, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${API_KEY}`,
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}).then(res => console.log('Init success:', JSON.stringify(res.data)))
|
||||
.catch(err => {
|
||||
console.error('Init failed:', err.response ? err.response.status : err.message);
|
||||
if(err.response) console.error(JSON.stringify(err.response.data));
|
||||
});
|
||||
Reference in New Issue
Block a user