<p>As you can see in the error message, the address you provide is not in the expected format.</p>
<p>Addresses on testnets start with &quot;addr_test1&quot; but the address you provide starts with &quot;addr1&quot; (probably a mainnet address).</p>
<p>Try to add a testnet address to the request and it should work.</p>
<p>Example testnet address: <code>addr_test1qpmtp5t0t5y6cqkaz7rfsyrx7mld77kpvksgkwm0p7en7qum7a589n30e80tclzrrnj8qr4qvzj6al0vpgtnmrkkksnqd8upj0</code></p>
<p>Also note that you probably want to use the PreProd network instead of the testnet. Testnet has been broken a while ago.</p>

CC BY-SA 4.0
2022-11-02T13:25:22.730Z
Thanks for your great answer!
Bzzard
CC BY-SA 4.0
2022-11-02T15:24:54.437Z
You're welcome. I see you're new here. If this has answered your question, you can mark the answer as accepted.
eddex
CC BY-SA 4.0
2022-11-02T12:54:13.653Z
2022-11-02T12:54:13.653Z
eddex
<p>As mentioned in the error message, you're using invalid (mainnet) address against testnet endpoint</p>

CC BY-SA 4.0
2022-11-02T12:53:37.613Z
2022-11-02T12:53:37.613Z
RdLrT
<p><a href="https://i.sstatic.net/kyxFR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kyxFR.png" alt="enter image description here" /></a></p>
<p>export const callApi = async (endPoint: string) =&gt; {
try {
const request: string = env.REACT_APP_BLOCKFROST_URL + endPoint
const response = await fetch(request, {
//@ts-ignore
headers: {
&quot;Content-Type&quot;: &quot;application/json&quot;,
project_id: process.env.REACT_APP_BLOCKFROST_KEY,
},
method: &quot;GET&quot;,
})
let data = await response.json()
return data
} catch (error) {}
}</p>
<p>export const findAssets = async (stakeAddress: string) =&gt; {
const endPoint = <code>accounts/${stakeAddress}/addresses/assets</code>
const result = await callApi(endPoint)</p>
<p>return result
}
<a href="https://i.sstatic.net/kyxFR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kyxFR.png" alt="enter image description here" /></a></p>

<blockfrost>
I'd like to get assets from the wallet using blockfrost, but some errors occur
# I'd like to get assets from the wallet using blockfrost, but some errors occur

(Asked by: username_0 on 2022-11-02)

[![enter image description here](https://i.sstatic.net/kyxFR.png)](https://i.sstatic.net/kyxFR.png)

export const callApi = async (endPoint: string) => {
try {
const request: string = env.REACT\_APP\_BLOCKFROST\_URL + endPoint
const response = await fetch(request, {
//@ts-ignore
headers: {
"Content-Type": "application/json",
project\_id: process.env.REACT\_APP\_BLOCKFROST\_KEY,
},
method: "GET",
})
let data = await response.json()
return data
} catch (error) {}
}

export const findAssets = async (stakeAddress: string) => {
const endPoint = `accounts/${stakeAddress}/addresses/assets`
const result = await callApi(endPoint)

return result
}
[![enter image description here](https://i.sstatic.net/kyxFR.png)](https://i.sstatic.net/kyxFR.png)

**Tags:** blockfrost

---

## 2 answers

### Answer by username_1 on 2022-11-02. Score: 2 | Accepted answer

As you can see in the error message, the address you provide is not in the expected format.

Addresses on testnets start with "addr\_test1" but the address you provide starts with "addr1" (probably a mainnet address).

Try to add a testnet address to the request and it should work.

Example testnet address: `addr_test1qpmtp5t0t5y6cqkaz7rfsyrx7mld77kpvksgkwm0p7en7qum7a589n30e80tclzrrnj8qr4qvzj6al0vpgtnmrkkksnqd8upj0`

Also note that you probably want to use the PreProd network instead of the testnet. Testnet has been broken a while ago.

> **Comments:**
> **username_0**: Thanks for your great answer!  
> **username_1**: You're welcome. I see you're new here. If this has answered your question, you can mark the answer as accepted.  

---

### Answer by username_2 on 2022-11-02. Score: 0

As mentioned in the error message, you're using invalid (mainnet) address against testnet endpoint


---

