Skip to main content

Getting Started

Follow these steps to get started with Warrant, from account creation to creating and enforcing rules in < 10 minutes.

Create an account

  • First, create an account for your organization.
  • Once you're logged in, you can view your API keys and invite your teammates.
  • The dashboard lets you view and manage your entire authorization model, including your object types, warrants, users, tenants and environments.
note

If a Warrant account already exists for your organization, please ask your account admin to invite you directly from the dashboard.

Install & configure SDK(s)

The primary way to interact with Warrant is via the REST APIs. You can call API endpoints directly (API reference) or use the native and open-source libraries:

Back-end (server-side)

Install:

go get github.com/warrant-dev/warrant-go/v3

Usage:

import (
"github.com/warrant-dev/warrant-go/v3"
)

client := warrant.NewClient(config.ClientConfig{
ApiKey: "YOUR_KEY"
})

Front-end (client-side)

Install:

npm install @warrantdev/react-warrant-js

Usage:

// App.jsx
import React from "react";
import { WarrantProvider } from "@warrantdev/react-warrant-js";

const App = () => {
return (
<WarrantProvider clientKey="CLIENT_KEY">
{/* Routes, ThemeProviders, etc. */}
</WarrantProvider>
);
};

export default App;

Implementing Authz

Now that you have an account and API access, you need to set up your application's authorization model. This consists of the following steps: