Skip to Content
Grail Network

Authentication

How your server signs its requests with the partner's API key.

Every request carries the partner's API key as a bearer token:

GET /partner/items HTTP/1.1
Host: api-stg.grailnetwork.com
Authorization: Bearer grail_partner_<your key>
  • Grail Network's staff make the key for your partner, and give it to you once. Grail Network keeps only its hash.
  • A new key stops the old key at once. Put the new key into your server right after you get it.
  • The key belongs to the partner. Every /partner route reads the partner from the key, so a route never takes a partner's id. A route never shows another partner's cards.
  • A request with no key, or with a key that is not valid, gets 401. A route that a partner may not call gets 403.

Keep the key on your server. Never put it into a page or an app that a consignor can read.