Skip to content

structure-ac/structure-ts

Repository files navigation

Typescript SDK

Discover rich information on people and companies

SDK Installation

NPM

npm add structure-ac

Yarn

yarn add structure-ac

Authentication

You'll need to authenticate your requests to access any of the endpoints in the Structure API. In this guide, we'll look at how authentication works. Structure offers authentication for your API requests with a token.

OAuth2 with bearer token

Authentication with the Structure API is using OAuth2. When establishing a connection using OAuth2, you will need your access token — you will find it in the Structure dashboard under API settings.

SDK Example Usage

import { Structure } from "structure-ac";
import { EnrichCompanyResponse } from "structure-ac/dist/sdk/models/operations";

const sdk = new Structure({
  security: {
    bearerAuth: "",
  },
});

sdk.companies.enrich({
  id: "89bd9d8d-69a6-474e-8f46-7cc8796ed151",
}).then((res: EnrichCompanyResponse) => {
  if (res.statusCode == 200) {
    // handle response
  }
});

Available Resources and Operations

  • login - Login user
  • me - Show current user

SDK Generated by Speakeasy