class Stytch::ConnectedApp::Clients
def create(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedAppWithClientSecret+ (+object+).
The Connected App created by this API call.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is nilable +String+.
(no documentation yet)
id_token_template_content::
The type of this field is nilable +Boolean+.
Valid for first party clients only. If true, the client does not need to request explicit user consent for the `offline_access` scope.
bypass_consent_for_offline_access::
The type of this field is nilable +String+.
The logo URL of the Connected App, if any.
logo_url::
The type of this field is nilable list of +String+.
Array of redirect URI values for use in OIDC Logout flows.
post_logout_redirect_urls::
The type of this field is nilable +String+.
The content of the access token custom claims template. The template must be a valid JSON object.
access_token_template_content::
The type of this field is nilable +String+.
The custom audience for the access token.
access_token_custom_audience::
The type of this field is nilable +Integer+.
The number of minutes before the access token expires. The default is 60 minutes.
access_token_expiry_minutes::
The type of this field is nilable +Boolean+.
Valid for first party clients only. If `true`, an authorization token granted to this Client can be exchanged for a full Stytch session.
full_access_allowed::
The type of this field is nilable list of +String+.
Array of redirect URI values for use in OAuth Authorization flows.
redirect_urls::
The type of this field is nilable +String+.
A human-readable description for the client.
client_description::
The type of this field is nilable +String+.
A human-readable name for the client.
client_name::
The type of this field is +CreateRequestClientType+ (string enum).
The type of Connected App. Supported values are `first_party`, `first_party_public`, `third_party`, and `third_party_public`.
client_type::
== Parameters:
**Important:** This is the only time you will be able to view the generated `client_secret` in the API response. Stytch stores a hash of the `client_secret` and cannot recover the value if lost. Be sure to persist the `client_secret` in a secure location. If the `client_secret` is lost, you will need to trigger a secret rotation flow to receive another one.
Creates a new Connected App. If the Connected App `client_type` is `first_party` or `third_party` a `client_secret` is returned.
def create( client_type:, client_name: nil, client_description: nil, redirect_urls: nil, full_access_allowed: nil, access_token_expiry_minutes: nil, access_token_custom_audience: nil, access_token_template_content: nil, post_logout_redirect_urls: nil, logo_url: nil, bypass_consent_for_offline_access: nil, id_token_template_content: nil ) headers = {} request = { client_type: client_type } request[:client_name] = client_name unless client_name.nil? request[:client_description] = client_description unless client_description.nil? request[:redirect_urls] = redirect_urls unless redirect_urls.nil? request[:full_access_allowed] = full_access_allowed unless full_access_allowed.nil? request[:access_token_expiry_minutes] = access_token_expiry_minutes unless access_token_expiry_minutes.nil? request[:access_token_custom_audience] = access_token_custom_audience unless access_token_custom_audience.nil? request[:access_token_template_content] = access_token_template_content unless access_token_template_content.nil? request[:post_logout_redirect_urls] = post_logout_redirect_urls unless post_logout_redirect_urls.nil? request[:logo_url] = logo_url unless logo_url.nil? request[:bypass_consent_for_offline_access] = bypass_consent_for_offline_access unless bypass_consent_for_offline_access.nil? request[:id_token_template_content] = id_token_template_content unless id_token_template_content.nil? post_request('/v1/connected_apps/clients', request, headers) end
def delete(
(no documentation yet)
status_code::
The type of this field is +String+.
The ID of the client.
client_id::
The type of this field is +String+.
(no documentation yet)
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:
Deletes a Connected App.
def delete( client_id: ) headers = {} delete_request("/v1/connected_apps/clients/#{client_id}", headers) end
def get(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedApp+ (+object+).
The Connected App affected by this operation.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The ID of the Connected App client.
client_id::
== Parameters:
Retrieve details of a specific Connected App by `client_id`.
def get( client_id: ) headers = {} query_params = {} request = request_with_query_params("/v1/connected_apps/clients/#{client_id}", query_params) get_request(request, headers) end
def initialize(connection)
def initialize(connection) @connection = connection @secrets = Stytch::ConnectedApp::Clients::Secrets.new(@connection) end
def search(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ResultsMetadata+ (+object+).
The search `results_metadata` object contains metadata relevant to your specific query like total and `next_cursor`.
results_metadata::
The type of this field is list of +ConnectedApp+ (+object+).
(no documentation yet)
connected_apps::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is nilable +Integer+.
The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by a single search request. If the total size of your result set is greater than one page size, you must paginate the response. See the `cursor` field.
limit::
The type of this field is nilable +String+.
The `cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until the `next_cursor` in the response is null.
cursor::
== Parameters:
Search for Connected Apps. Supports cursor-based pagination. Specific filters coming soon.
def search( cursor: nil, limit: nil ) headers = {} request = {} request[:cursor] = cursor unless cursor.nil? request[:limit] = limit unless limit.nil? post_request('/v1/connected_apps/clients/search', request, headers) end
def update(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +ConnectedApp+ (+object+).
The Connected App affected by this operation.
connected_app::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is nilable +String+.
(no documentation yet)
id_token_template_content::
The type of this field is nilable +Boolean+.
Valid for first party clients only. If true, the client does not need to request explicit user consent for the `offline_access` scope.
bypass_consent_for_offline_access::
The type of this field is nilable +String+.
The logo URL of the Connected App, if any.
logo_url::
The type of this field is nilable list of +String+.
Array of redirect URI values for use in OIDC Logout flows.
post_logout_redirect_urls::
The type of this field is nilable +String+.
The content of the access token custom claims template. The template must be a valid JSON object.
access_token_template_content::
The type of this field is nilable +String+.
The custom audience for the access token.
access_token_custom_audience::
The type of this field is nilable +Integer+.
The number of minutes before the access token expires. The default is 60 minutes.
access_token_expiry_minutes::
The type of this field is nilable +Boolean+.
Valid for first party clients only. If `true`, an authorization token granted to this Client can be exchanged for a full Stytch session.
full_access_allowed::
The type of this field is nilable list of +String+.
Array of redirect URI values for use in OAuth Authorization flows.
redirect_urls::
The type of this field is nilable +String+.
A human-readable description for the client.
client_description::
The type of this field is nilable +String+.
A human-readable name for the client.
client_name::
The type of this field is +String+.
The ID of the client.
client_id::
== Parameters:
Updates mutable fields of a Connected App. Cannot update Client Type, Client ID, or Secrets.
def update( client_id:, client_name: nil, client_description: nil, redirect_urls: nil, full_access_allowed: nil, access_token_expiry_minutes: nil, access_token_custom_audience: nil, access_token_template_content: nil, post_logout_redirect_urls: nil, logo_url: nil, bypass_consent_for_offline_access: nil, id_token_template_content: nil ) headers = {} request = {} request[:client_name] = client_name unless client_name.nil? request[:client_description] = client_description unless client_description.nil? request[:redirect_urls] = redirect_urls unless redirect_urls.nil? request[:full_access_allowed] = full_access_allowed unless full_access_allowed.nil? request[:access_token_expiry_minutes] = access_token_expiry_minutes unless access_token_expiry_minutes.nil? request[:access_token_custom_audience] = access_token_custom_audience unless access_token_custom_audience.nil? request[:access_token_template_content] = access_token_template_content unless access_token_template_content.nil? request[:post_logout_redirect_urls] = post_logout_redirect_urls unless post_logout_redirect_urls.nil? request[:logo_url] = logo_url unless logo_url.nil? request[:bypass_consent_for_offline_access] = bypass_consent_for_offline_access unless bypass_consent_for_offline_access.nil? request[:id_token_template_content] = id_token_template_content unless id_token_template_content.nil? put_request("/v1/connected_apps/clients/#{client_id}", request, headers) end