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
- Node
- JavaScript (legacy)
- C#
- Python
- Go
curl "https://api.basistheory.com" \
-H "BT-API-KEY: <API_KEY>"
import { BasisTheoryClient, BasisTheory } from "@basis-theory/node-sdk";
const client = new BasisTheoryClient({ apiKey: "<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.Client;
var client = new BasisTheory(apiKey: "<API_KEY>");
from basis_theory import BasisTheory
client = BasisTheory(
api_key="<API_KEY>",
)
import (
"github.com/basis-theory/go-sdk"
basistheoryclient "github.com/basis-theory/go-sdk/client"
"github.com/basis-theory/go-sdk/option"
)
client := basistheoryclient.NewClient(
option.WithAPIKey("<API_KEY>"),
)