Authentication
Basis Theory uses API keys to allow access to the API.
Basis Theory requires the API key to be included in all API requests to the server in a header that looks like the following:
BT-API-KEY: <API_KEY>
You must replace
<API_KEY>
with your API key supplied when you created an Application.Request
- cURL
- JavaScript
- C#
- Python
- Go
curl "https://api.basistheory.com" \
-H "BT-API-KEY: <API_KEY>"
import { BasisTheory } from "@basis-theory/basis-theory-js";
// at instance
const bt = await new BasisTheory().init("<MANAGEMENT_API_KEY>");
// per call
const bt = await new BasisTheory().init();
const applications = await bt.applications.list(
{},
{
apiKey: "<MANAGEMENT_API_KEY>",
}
);
using BasisTheory.net.Tokens;
// At service
var client = new TokenClient("<PRIVATE_API_KEY>");
// Per call
var client = new TokenClient();
await client.GetAsync(requestOptions: new RequestOptions {
ApiKey = "<PRIVATE_API_KEY>"
});
import basistheory
from basistheory.api import tokens_api
# At instance
api_client = basistheory.ApiClient(configuration=basistheory.Configuration(api_key="<PRIVATE_API_KEY>"))
client = tokens_api.TokensApi(api_client)
# Per call
client.list(request_options=basistheory.RequestOptions(api_key="<PRIVATE_API_KEY>"))