Closed LuisRivera1699 closed 2 months ago
Hello, I'm making a deploying site for my users and when calling the deploy order I'm getting CORS Error. This is my code, hope you can help me.
`const deployJSON = { "receiveAddress": account.address, "feeRate": 1, "outputValue": 546, "devAddress": "", "devFee": 0, "brc20Ticker": tick, "brc20Max": max, "brc20Limit": lim };
// send inscription request try { const response = await axios({ method: 'post', url: 'https://open-api-testnet.unisat.io/v2/inscribe/order/create/brc20-deploy', headers: { "Authorization": "Bearer {API_KEY}", "Content-Type": "application/json", }, data: deployJSON }); console.log(response); } catch (error) { console.log("Error while inscription for xverse: ", error); openSnackbar( <div style={{ maxWidth: 500 }}> <p>Error occured. </p> <p>{error.message}</p> </div>, "error" ); }`
https://open-api-testnet.unisat.io/v2/inscribe/order/create/brc20-deploy
check your request header. if you javescript, the "Authorization" should be Bearer ${YOUR_API_KEY}
Bearer ${YOUR_API_KEY}
Hello, I'm making a deploying site for my users and when calling the deploy order I'm getting CORS Error. This is my code, hope you can help me.
`const deployJSON = { "receiveAddress": account.address, "feeRate": 1, "outputValue": 546, "devAddress": "", "devFee": 0, "brc20Ticker": tick, "brc20Max": max, "brc20Limit": lim };