FusionAuth Typescript Client

Typescript Client Library

The Typescript client library allows you to integrate FusionAuth with your Typescript application.

Source Code:

NPM Package:

To install the FusionAuth Typescript Client package run:

$ npm install @fusionauth/typescript-client

The following code assumes FusionAuth is running on http://localhost:9011 and uses an API key 6b87a398-39f2-4692-927b-13188a81a9a3, you will need to supply your own API key, and if you are not running FusionAuth locally, your host parameter may be different.

Here is an example of using the retrieveUserByEmail method to retrieve a User by an email address.

import {FusionAuthClient} from 'FusionAuthClient'
const client = new FusionAuthClient('6b87a398-39f2-4692-927b-13188a81a9a3', 'http://localhost:9011');

// Retrieve User by Email Address

function handleResponse (clientResponse) {
  console.info(JSON.stringify(clientResponse.successResponse.user, null, 2));