Skip to main content
PUT
/
edges
/
https
/
{edge_id}
/
routes
/
{id}
/
oauth
Replace
curl --request PUT \
  --url https://api.ngrok.com/edges/https/{edge_id}/routes/{id}/oauth \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'ngrok-version: <ngrok-version>' \
  --data '{
  "edge_id": "<string>",
  "id": "<string>",
  "module": {
    "enabled": true,
    "provider": {
      "github": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ],
        "teams": [
          "<string>"
        ],
        "organizations": [
          "<string>"
        ]
      },
      "facebook": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "microsoft": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "google": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "linkedin": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "gitlab": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "twitch": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      },
      "amazon": {
        "client_id": "<string>",
        "client_secret": "<string>",
        "scopes": [
          "<string>"
        ],
        "email_addresses": [
          "<string>"
        ],
        "email_domains": [
          "<string>"
        ]
      }
    },
    "options_passthrough": true,
    "cookie_prefix": "<string>",
    "inactivity_timeout": 123,
    "maximum_duration": 123,
    "auth_check_interval": 123
  }
}'
{
  "enabled": true,
  "provider": {
    "github": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ],
      "teams": [
        "<string>"
      ],
      "organizations": [
        "<string>"
      ]
    },
    "facebook": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "microsoft": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "google": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "linkedin": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "gitlab": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "twitch": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    },
    "amazon": {
      "client_id": "<string>",
      "client_secret": "<string>",
      "scopes": [
        "<string>"
      ],
      "email_addresses": [
        "<string>"
      ],
      "email_domains": [
        "<string>"
      ]
    }
  },
  "options_passthrough": true,
  "cookie_prefix": "<string>",
  "inactivity_timeout": 123,
  "maximum_duration": 123,
  "auth_check_interval": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

ngrok-version
integer
default:2
required

Path Parameters

edge_id
string
required
id
string
required

Body

application/json
edge_id
string

n/a

id
string

n/a

module
object

n/a

Response

200 - application/json

n/a

enabled
boolean

true if the module will be applied to traffic, false to disable. default true if unspecified

provider
object

an object which defines the identity provider to use for authentication and configuration for who may access the endpoint

options_passthrough
boolean

Do not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.

the prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'

inactivity_timeout
integer

Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.

maximum_duration
integer

Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.

auth_check_interval
integer

Integer number of seconds after which ngrok guarantees it will refresh user state from the identity provider and recheck whether the user is still authorized to access the endpoint. This is the preferred tunable to use to enforce a minimum amount of time after which a revoked user will no longer be able to access the resource.