API reference

OAuth providers

Set up the social and OAuth sign-in providers an app offers, with your own client id and secret.

An app offers "Continue with" sign-in for each provider you set up with your own OAuth client. These routes take an app key in Authorization and an M2M token of the app in X-Authorization. Adding and removing providers with an M2M token needs its write scope. See Authentication.

The providers Scute supports: google, facebook, github, discord, twitter, apple, microsoft, linkedin, gitlab, bitbucket, slack, spotify, twitch, dropbox, notion, figma, zoom, shopify, stripe.

In each provider's console, set the redirect URI to the app's callback URL, https://api.scute.io/v1/auth/:app_id/oauth/callback with the app's UUID. The catalog below returns it.

List the provider catalog#

GET/v1/apps/:app_id/auth_providers/catalogApp key + M2M

Every provider Scute can set up, what the create call needs, and whether this app has it. Never returns a client id or secret.

cURLbash
curl https://api.scute.io/v1/apps/$SCUTE_APP_ID/auth_providers/catalog \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "providers": [    {      "slug": "google",      "name": "Google",      "icon": "provider-icons/google-icon.svg",      "fields": ["client_id", "client_secret"],      "callback_url": "https://api.scute.io/v1/auth/0193f8aa-5555-7666-8777-888888888888/oauth/callback",      "configured": true,      "enabled": true    }  ]}

List the app's providers#

GET/v1/apps/:app_id/auth_providersApp key + M2M

Returns the app's OAuth providers together with its SMS message providers, each with a slug. OAuth entries carry client_id, enabled and client_secret_set (whether a secret is stored); the secret itself is never returned. saml_sign_in is true when SAML counts as a way to sign in to the app.

cURLbash
curl https://api.scute.io/v1/apps/$SCUTE_APP_ID/auth_providers \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "auth_providers": [    { "slug": "google", "client_id": "1234.apps.googleusercontent.com", "enabled": true, "client_secret_set": true }  ],  "saml_sign_in": false}

The example shows a subset of the fields.

Add or change a provider#

POST/v1/apps/:app_id/auth_providersApp key + M2M

Creates the provider, or updates it when the app already has one with that slug. Send the fields inside auth_provider. A blank client_secret leaves the stored secret as it is.

auth_provider.slugstringrequired
The provider, from the list above.
auth_provider.client_idstringrequired
Your OAuth client id.
auth_provider.client_secretstringrequired
Your OAuth client secret. Required when the provider is created.
auth_provider.enabledboolean
Whether users can sign in with it.
cURLbash
curl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/auth_providers \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "auth_provider": {      "slug": "google",      "client_id": "1234.apps.googleusercontent.com",      "client_secret": "GOCSPX-xxxxxxxx",      "enabled": true    }  }'
Response 201json
{  "auth_provider": {    "slug": "google",    "client_id": "1234.apps.googleusercontent.com",    "enabled": true,    "app_id": "app_3mxZRrzWxhPZ08dXvqq6",    "callback_url": "https://api.scute.io/v1/auth/0193f8aa-5555-7666-8777-888888888888/oauth/callback",    "client_secret_set": true  }}

An update returns 200 with the same shape.

StatusWhen
422No slug, a provider Scute does not support, a missing client id or secret, or disabling the app's last way to sign in. The body has errors.

Remove a provider#

DELETE/v1/apps/:app_id/auth_providers/:idApp key + M2M

:id is the provider's slug (google) or its id. The client id and secret are deleted, and users can no longer sign in with it.

cURLbash
curl -X DELETE https://api.scute.io/v1/apps/$SCUTE_APP_ID/auth_providers/google \  -H "Authorization: Bearer $SCUTE_APP_SECRET" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"

Returns 204 with no body.

StatusWhen
404The app has no such provider.
422It is the app's last way to sign in. The body has errors.