Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
curl is the fastest way to poke at the Polygon JSON-RPC API without pulling in an SDK — it is ideal for testing that your endpoint works, debugging a malformed request, or wiring quick checks into shell scripts and CI pipelines. Every Polygon RPC call is an HTTP POST carrying a JSON body, so each request needs the Content-Type: application/json header. Your API key lives in the URL path: https://polygon.therpc.io/YOUR_API_KEY. Because Polygon PoS (chain ID 137) speaks the standard Ethereum JSON-RPC dialect, the same method names you know from Ethereum — eth_blockNumber, eth_getBalance, and the rest — work here unchanged.
You can authenticate to Polygon in two ways: place the key directly in the URL path (https://polygon.therpc.io/YOUR_API_KEY), or send it as a Bearer token in the Authorization: Bearer YOUR_API_KEY header. Either way, every request to the Polygon endpoint must be a POST with Content-Type: application/json.