Authentication
To authenticate API requests, you need to generate your keys by sending an email to [email protected]
Two keys will be generated for you:
Public Key: Think of this as a username. It's how Sendcash knows which user is attempting to make a request.
Secret Key: Think of this as a password. Sendcash never stores your Secret Key, we will only generate it and send it to you. Copy & keep your secret key in a secure place (e.g Environment Variables).
To authenticate your GraphQL request, you need to use Basic Authentication with the Public Key as username and the Secret Key as password.
Basic Authentication Primer
username (Public Key) and password (Secret Key) are concatenated into a single string:
username:password
This string is encoded with Base64
The
Basic
keyword is put before this encoded value and shall result in something like this:Basic am9objpzZWNyZXQ=
The entire string should be added to the header of the request with the key
Authorization
How to Authenticate with GraphQL
Most GraphQL client libraries have some way to add headers to all your requests. Here's a JavaScript example with Apollo Boost
Last updated