Hi everyone,
We are building a react native nodejs app and we are able to get the correct client token. Every user that signs up gives access to our app and we retrieve a token successfully. Which is inputted like this
const alpacaApi = (baseURL = ALPACA_API_ENDPOINT) => {
const api = apisauce.create({
baseURL,
headers: {
Authorization: "Bearer "
},
timeout: 5000,
});
and all functions work with it other than post order.
But when we try to post an order with this const postOrder = (data) => api.post(‘v2/orders’, data); it doesn’t work.
When we use this below however we are able to submit orders.
const api = apisauce.create({
baseURL,
headers: {
"APCA-API-KEY-ID": ALPACA_API_CLIENT_KEY_ID,
"APCA-API-SECRET-KEY": ALPACA_API_CLIENT_SECRET_KEY,
},
What do we need in the client token or what could be wrong? Our users need to be able to submit orders with their own token without secret keys etc.
Thank you!