Skip to main content
All requests to Uniblock WebSocket endpoints must include the following header:
  • Header: X-API-KEY
  • Value: Your unique Uniblock API key

Authentication flow

Use the same authentication header for both steps of the connection flow:
  1. Send an HTTP request to the provider’s /validate endpoint.
  2. Open the corresponding WSS endpoint.
  3. Send your provider-specific subscription or message payload.
Use a WebSocket client that supports custom headers so you can pass X-API-KEY during connection setup.

Example validation request

curl --request GET \
  --url 'https://lively-dust-7404.lively-fog-f2d9.workers.dev/ankr/validate?chainId=1' \
  --header 'X-API-KEY: YOUR_UNIBLOCK_API_KEY'

Notes

  • Reuse the same header values when moving from validation to the WebSocket connection.
  • Some providers require additional query parameters such as chainId.
  • Message formats after connection are provider-specific.