REST
Credentials support integration with any available REST
endpoints and send requests during user verification for interaction.
The REST
Credential is a method used by Galxe to pull data from your RESTful HTTPS
backend (or any legally accessible HTTP RESTful
endpoint). It takes a single wallet address as input and outputs 1
(eligible) or 0
(not eligible) to determine whether the wallet address qualifies.
REST API
and waits for the response.
response.body
from your backend using predefined expressions to determine if the user meets the conditions.
35.185.209.0
and 35.203.155.18
are our outbound IPs. Failure to whitelist these may result in 403 errors when accessing the service.REST
endpoint.Key-value
pairs included in the REST
request.$address
: Replaced with the user’s wallet address as a hexadecimal string with the 0x
prefix, e.g., 0x95ad73...
.
$addressWithout0x
: Replaced with the user’s wallet address as a hexadecimal string without the 0x
prefix, e.g., 95ad73...
, typically used for constructing eth_call
requests.
$socialId
: Used when user information is not an address (email or Telegram ID) and replaced with the respective information.
0x
), Galxe converts them to lowercase before sending to your endpoint.GET
and POST
responses.
JavaScript (ES6)
function with the type signature (object) => int
.
resp
as a parameter.
1
or 0
, indicating whether the address qualifies for the credential.
true/false
) or strings ("0"/"1"
).anonymous
, with the first line written in the following format:
function
, always validate the structure of the resp
object before accessing its properties,
this helps prevent errors or unexpected behavior when the API response is incomplete or incorrectly formatted.REST API
, you can achieve secure access through request headers (such as API KEY
or tokens
). This information will not be exposed by Galxe, and only users with Space admin privileges can view it.
OPTIONS
requests during API configuration to validate the API’s correctness. This process does not adhere to the Simple Request Convention.