Skip to main content

Environment Variables

This page lists only the settings meaningful to external developers — the ones you can set in your own service that actually change behaviour. Platform-internal service configuration (database connections, object storage credentials, model keys) is not listed; Profy operates those and you neither see nor need them.

SDK configuration

Auth and address

Resolution order puts constructor arguments ahead of environment variables:
A missing PROFY_API_KEY raises at construction rather than degrading to anonymous:
A trailing slash on PROFY_BASE_URL is stripped automatically, so https://api.profy.cn/ and https://api.profy.cn behave identically. For private deployments or local development this is the only setting you change; nothing else in the SDK differs.

OAuth applications

Third-party apps acting on behalf of many Profy users use application credentials rather than an API key: Missing either one raises:
The default scope on authorization requests is events:write.
PROFY_APP_SECRET is a server-side credential. The moment it appears in a browser bundle, a mobile app, or any client code it is effectively public — the authorization-code exchange must happen on your server.

Deliberately not environment variables

A few settings are intentionally excluded, and the reasons matter:
End-user identity is the one most often misread. It looks “fixed per deployment,” but one API key fronting many users is the normal case — so it has to vary per request, and an environment variable would freeze it. A single-user script can set end_user_id once on the client; a server-side integration passes it per call.

Proxies and networking

The SDK’s internal HTTP client sets trust_env=False explicitly, which means:
  • HTTP_PROXY / HTTPS_PROXY / ALL_PROXY are not read
  • NO_PROXY likewise has no effect
  • System CA bundles and .netrc do not participate
This is the easiest trap to fall into: you have a proxy configured, curl works, requests works, and the SDK still connects directly.It is not a defect. Honouring the environment would break direct file uploads (presigned URLs), where two competing Authorization mechanisms collide — the SDK’s Bearer header makes object storage ignore the query-string signature and return 400. To avoid that near-unattributable failure, the SDK uniformly ignores environment proxies.If you need a proxy, pass a custom HTTP client through the constructor rather than relying on environment variables.

MCP integration

The remote MCP server needs no environment variables at all — only a config file:
.mcp.json
Authentication reuses your IDE’s existing login session (Bearer token or cookie); no secret travels through the environment. The tool list is in MCP Tools.

Full example

Boundaries and failure modes

The fourth row is especially common: many .env loaders inject variables at import time, after a module-level client has already been constructed. Create clients inside a function rather than at module top level.

Verify your configuration

If this runs, your key, base URL, and end-user identity are all correct. Any one of them being wrong surfaces here rather than in production.

Authentication

API keys versus OAuth

Endpoint Reference

Every /v1/* endpoint

Error Codes

Codes returned by configuration errors

MCP Tools

IDE integration
Verified 2026-08-11. Sources: sdk/python/profy/client.py (DEFAULT_BASE_URL, _DEFAULT_TIMEOUT, trust_env=False, _end_user_headers), sdk/python/profy/app.py (PROFY_APP_ID / PROFY_APP_SECRET / DEFAULT_SCOPE), services/core/src/routes/platform-api/caller.ts (end-user header gate).