Skip to main content
What you’ll learn:
  • Dynamic provider deployment creation via API
  • BYO OAuth app configuration
  • Enterprise compliance patterns
Related resources:
Need full control over OAuth apps and API keys for compliance, branding, or security? Metorial lets you create provider deployments dynamically via the API using your own credentials—no dashboard required.

Why BYO?

Using your own credentials gives you full control over how your users authenticate and how your infrastructure handles sensitive data. Enterprise teams choose BYO for three main reasons:
Compliance & Security:
  • Keep credentials in your own infrastructure
  • Meet data residency requirements
  • Audit and rotate credentials on your schedule
Branding & Control:
  • OAuth consent screens show your company name
  • Use your company’s existing OAuth apps
  • Control which permissions are requested
Multi-tenancy:
  • Create isolated provider deployments per customer
  • Different credentials for different organizations
  • Scale deployment creation programmatically

Dynamic Provider Deployments

Create provider deployments programmatically via the Metorial API instead of using the dashboard. The flow:
  1. Create a Provider Deployment via the API
  2. Create a Provider Auth Config with your credentials, linked to the deployment
  3. Use the provider deployment ID in sessions like any other integration
Ideal for multi-tenant applications where each customer needs isolated credentials, or enterprises managing multiple OAuth apps across teams.

Creating a Provider Deployment

curl -X POST https://api.metorial.com/provider-deployments \
  -H "Authorization: Bearer metorial_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp Slack",
    "provider_id": "prv_slack"
  }'

Creating a Provider Auth Config

curl -X POST https://api.metorial.com/provider-auth-configs \
  -H "Authorization: Bearer metorial_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp Slack Credentials",
    "provider_auth_method_id": "pam_slack_oauth",
    "provider_deployment_id": "pdp_abc123",
    "value": {
      "client_id": "your-oauth-client-id",
      "client_secret": "your-oauth-client-secret"
    }
  }'
Once created, use the provider deployment ID when creating sessions or setup sessions for your users.

BYO OAuth Apps

Use your own OAuth app credentials instead of Metorial’s default OAuth apps. Setup process:
1

Register OAuth App

Register your OAuth app with the service (GitHub, Slack, Google, etc.). Save your client ID and client secret.
2

Create Provider Deployment via API

Call POST /provider-deployments to create a deployment for the provider.
3

Create Provider Auth Config

Call POST /provider-auth-configs with your OAuth app credentials linked to the deployment.
4

Use the Deployment

Use the provider deployment ID in your session creation and provider setup sessions. Your users will see your OAuth app name when authorizing.
Benefits:
  • Consent screens show your company name and branding
  • Full control over scopes and permissions
  • Integrate with existing identity systems
  • Credentials stay in your infrastructure

BYO API Keys

Use your own API keys for integrations like Exa, Brave, or Tavily.
Use cases:
  • Isolate usage per customer or team
  • Track costs per deployment
  • Rotate keys without affecting other deployments
Create a provider deployment and a provider auth config (type manual) with your API key—Metorial uses it when tools are called within sessions that reference that deployment.

What’s Next?