To enhance the security and reliability of your integrations, Safe is introducing authenticated API access. This ensures that only authorized applications and developers can interact with our services, protecting your data and the overall ecosystem.
โ ๏ธ Important: We plan to deprecate public (unauthenticated) endpoints in the near future. We strongly encourage you to transition to authenticated API access now to avoid disruptions to your integration.
This guide walks you through generating an API key, making authenticated requests, and understanding rate limits, error handling, and best practices.
*** The API Key is a JWT which is set to expire after 5 years.*
To authenticate your requests, include your API key in the Authorization header. Below there are different request examples. We use EIP3770 names for chains, so for example for Ethereum Mainnet (eth):
curl -X GET "<https://api.safe.global/tx-service/eth/api/v2/safes/0x5298a93734c3d979ef1f23f78ebb871879a21f22/multisig-transactions>" \\
-H "Authorization: Bearer $YOUR_API_KEY"
fetch(
"<https://api.safe.global/tx-service/eth/api/v2/safes/0x5298a93734c3d979ef1f23f78ebb871879a21f22/multisig-transactions>",
{
method: "GET",
headers: {
Authorization: "Bearer $YOUR_API_KEY",
},
}
)
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
<aside> ๐ก
Available from @safe-global/api-kit@v4.0.0-alpha.0
</aside>