Authentication

You will need to authenticate your requests to access any of the endpoints in the Moon Banking API. In this guide, we will look at how authentication works.

to display your API key if you have one, or generate an API key here. →

API Key with bearer token

To authenticate with the Moon Banking API, use your API key. Your API key should be prepended with Bearer and added to the Authorization header.

Example request with bearer token

curl -G https://api.moonbanking.local/v1/world \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Moon-Banking-Version: 2025-07-11" \
  --data-urlencode "include=scores"

Always keep your token safe and reset it if you suspect it has been compromised.

Using an SDK

If you use one of our official SDKs, you will not have to worry about any of the above. Take a look at the documentation for any of the resources to see how your chosen SDK handles authentication.

Was this page helpful?