Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 911 Bytes

File metadata and controls

24 lines (20 loc) · 911 Bytes

Constant Contact API Typescript SDK

SDK version 1.5.0

This repository contains a Typescript SDK for the public Constant Contact API. The code was generated using openapi-generator.

Installing

You can install this library using npm: npm install ctct-api-client

Getting Started

This example demonstrates using an access token to send a request.

You will need to provide a valid access token to successfully send API requests.

import { Configuration, SegmentsApi, GetAccountSegments200Response } from 'ctct-api-client';

const bearerAccessToken = "eyJraW....";
const configuration: Configuration = new Configuration({ accessToken: bearerAccessToken});
const segmentsApi = new SegmentsApi(configuration);
segmentsApi.getAllSegments().then(response => {
    console.log(response)
  }).catch(error => {
    console.log(error)
  })