Sites

Update the SSO configuration for a site

Use this endpoint to update the SSO configuration for a specific site.

put/shop/sites/{siteId}/shop-config/sso

Request body

idstring uuid

Identifier of the SSO configuration to update, returned by the SSO config read endpoint. Must match the configuration currently attached to the site in the URL.

site_idstring uuid

Identifier of the site that owns this SSO configuration. Must match the siteId in the request URL; provided redundantly to make the body self-describing for audit logs.

typestring

The type of SSO configuration.

enabledboolean

Whether the SSO configuration is enabled.

authorize_urlstring

The URL to redirect to for authorization.

token_urlstring

The URL to request an access token.

user_info_urlstring

The URL to request user information.

scopesstring[]

The scopes to request during authorization.

include_existing_url_paramsboolean

Whether to include existing URL parameters in the authorization request.

token_request_style'form_params' | 'json'

The style of the token request.

Example request

{
  "type": "customer_sso",
  "enabled": true,
  "authorize_url": "https://api.trybe.test/authorize",
  "credentials": {
    "client_id": "1234",
    "client_secret": "s3cr3tK3y123!@#"
  },
  "token_url": "https://api.trybe.test/token",
  "user_info_url": "https://api.trybe.test/userinfo",
  "scopes": [
    "openid"
  ],
  "token_request_style": "form_params",
  "user_mappings": [
    {
      "key": "full_name",
      "fields": [
        "email"
      ]
    }
  ]
}

Response

The SSO configuration for the site.

Example response

{
  "data": {
    "type": "customer_sso",
    "enabled": true,
    "authorize_url": "https://api.trybe.test/authorize",
    "credentials": {
      "client_id": "1234",
      "has_client_secret": true,
      "masked_client_secret": "***********"
    },
    "token_url": "https://api.trybe.test/token",
    "user_info_url": "https://api.trybe.test/userinfo",
    "scopes": [
      "openid"
    ],
    "token_request_style": "form_params",
    "user_mappings": [
      {
        "key": "email",
        "fields": [
          "email"
        ]
      }
    ],
    "created_at": "2025-05-01T00:00:00Z",
    "updated_at": "2025-05-01T00:00:00Z"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.