Portal
SandboxAPI v1Not signed inExternal user: —

Authentication

Problem: Authenticate and scope requests to an end-user. PythonTypeScript from foodapi import FoodAPI client = FoodAPI( api_key="foodapi_your_key",…

Problem: Authenticate and scope requests to an end-user.

from foodapi import FoodAPI

client = FoodAPI(
    api_key="foodapi_your_key",
    external_user_id="acct_9f2c",
)
items = client.pantry.list()
const client = new FoodAPI({
  apiKey: process.env.FOODAPI_API_KEY!,
  externalUserId: "acct_9f2c",
});
const items = await client.pantry.list();

Notes: Missing keys raise AuthenticationError / AuthenticationError (401).