mix tango.providers.create (tango v0.3.0)

Copy Markdown View Source

Creates a provider with OAuth credentials from the Nango catalog.

Usage

mix tango.providers.create PROVIDER_NAME [options]

Options

--client-id ID        OAuth2 client ID
--client-secret SECRET OAuth2 client secret
--scope SCOPE         Single OAuth2 scope (can be specified multiple times)
--scopes SCOPES       Comma-separated list of OAuth2 scopes
--auth-url URL        Authorization URL (overrides the catalog value)
--token-url URL       Token URL (overrides the catalog value)

Examples

# Create OAuth2 provider
mix tango.providers.create github --client-id=xxx --client-secret=yyy
mix tango.providers.create google --client-id=xxx --client-secret=yyy

# Create OAuth2 provider with custom scopes (multiple ways)
mix tango.providers.create google --client-id=xxx --client-secret=yyy --scope=https://www.googleapis.com/auth/calendar --scope=https://www.googleapis.com/auth/userinfo.email
mix tango.providers.create google --client-id=xxx --client-secret=yyy --scopes="https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/userinfo.email"

# Provider whose catalog URLs need connection configuration
mix tango.providers.create zendesk --client-id=xxx --client-secret=yyy \
  --auth-url=https://acme.zendesk.com/oauth/authorizations/new \
  --token-url=https://acme.zendesk.com/oauth/tokens

This command fetches the provider configuration from the Nango catalog (resolving alias: entries through their parent) and creates a ready-to-use provider with your credentials.

Catalog URLs with a a || b template use the alternative Nango uses without connection configuration. URLs that still need ${connectionConfig.*} values are rejected unless you pass --auth-url and --token-url.

Only OAuth2 providers are supported. --api-key is rejected with an error: Tango has no API-key connection flow, so the key would otherwise be dropped.