Issues to retrieves all orders that belong to a customer!

hello @Anonymous ,

I am trying to hit customer orders api in axios for react native it gives me the 401 error. but its working fine in postman and browser hit. Please help me out in this. here is the code below

const getOrders = () => {

let url = ‘https://${username}:${password}@${storename}.myshopify.com/admin/api/2022-04/customers/207119551/orders.json

console.log(“get uncodedUrl url”, url );

try {

const response = await axios.get(url)

console.log(‘response’, response)

} catch (error) {

console.log(‘error’, error)

}

}

useEffect(() => {

getOrders();

}, );