Skip to main content

Authentication

Requests use the HTTP Authorization header to both authenticate and authorize operations. The Mem API accepts access tokens in this header. Access tokens are provided to you when you create an API Key.

To do this, visit the API Flow within the Mem app. From this page, you'll be able to generate a new API access token for yourself.

Using the Mem Node.js SDK, an access token can be passed once to initialize a Client and the client can be used to send multiple authenticated requests.

Mem Client for Node.js
import { MemClient } from "@mem-labs/mem-node";
const memClient = new MemClient({
apiAccessToken: "<Replace this with your access token>"
});

When making requests directly to the REST API, you'll have to set the authorization header yourself.

Authorization: ApiAccessToken <Replace this with your access token>