Skip to content

MERGE_API_KEY vs X-Account-Token #15

@bengotow

Description

@bengotow

I know this module is largely autogenerated from the OpenAPI specification, but it could really use a thin wrapper specific to Merge. It's not clear how to configure this module to pass MERGE_API_KEY, and it'd also be nice if the library exposed a "factory" for configuring client objects that use different X-Account-Token values.

I used to work at Nylas so I'm somewhat biased, but this is what I'd expected to see here:

const Merge = require('merge-ats-node');

Merge.config({
  rootApiKey: MERGE_API_KEY,
});

// Make API requests to the LinkTokenApi, etc. using this global token

// Make API requests to a specific ATS integration like this:
const mergeForCustomerA = Merge.with(customer.mergeAccountToken);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions