This is the response I got using the localhost API
This is the response I get using the staging API deployed on the renderer
This is how I call the API
const [data, setData] = useState([]); useEffect(() => { const getSandboxKey = async () => { const config = { headers: { Authorization: `Bearer ${token}`, }, }; const response = await axios.get( `API_URL/api/v1/organization/get-sandbox-keys`, config ); setData(response.data.payload[0]); }; getSandboxKey(); }, []); return ( <div>{data.secretKey}</div> <div>{data.publicKey}</div> <div>{data.mode}</div> )
I'm trying to get some data from the payload. It works perfectly on localhost
P粉9358832922024-04-03 10:00:51
At first glance, I would check if tokens are the issue here. Some questions you might consider: