Quickstart

Clone an SDK, set your credentials and make a first request against the Intercom API.

  1. Clone an SDK

    Every SDK is published as source on GitHub. Clone the one for your language and run its test script; its README lists the toolchain it needs.

    bash
    gh repo clone OctriDev/intercom-typescript-showcase-sdk
    cd intercom-typescript-showcase-sdk
    ./scripts/test
  2. Set your credentials

    The quickstart reads its credentials from the environment, so nothing secret goes into source control.

    bash
    export API_TOKEN="..."
  3. Make a request

    The example below calls client.contentSnippets.get (GET /content_snippets/{id}) with example values for its required arguments.

    ts
    import { Intercom } from "@octridev/intercom";
    
    async function main() {
      const client = new Intercom({
        // Optional: replaces the default server and any server an operation declares.
        baseUrl: "https://api.intercom.io",
        auth: { bearerAuth: process.env.API_TOKEN! },
      });
      const result = await client.contentSnippets.get({ id: "123" });
      console.log(result);
    }
    
    main().catch(console.error);