Authentication

You'll need to authenticate your requests to access most of the endpoints in the trustshare API. In this guide, we'll look at how authentication works.

Using your API key

Most of the interactions you will need with the API will require the presence of an private key from an API key pair in the Authorization header of the request. You will need to generate an API key pair from the developer settings on the dashboard, if you haven't done so already. Here's how to add the token to the request header using cURL:

Example request with API key

curl https://rest.trustshare.io/v1/intent/intent_Av56qDDH7g \
  -H "Authorization: <private_key>"

Always keep your private key safe and delete it if you suspect it has been compromised.

Using an SDK

If you use one of our official API clients, you will have to provide your private key from the API key pair at the instantiation of the client. However, when using the client SDK you should use the public key from same pair.