### Get Settings Flow Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md Demonstrates how to retrieve a settings flow using the GetSettingsFlow method. Ensure you provide the correct flow ID, and optionally, session token or cookies for authentication. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { id := "id_example" // string | ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). xSessionToken := "xSessionToken_example" // string | The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) cookie := "cookie_example" // string | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.GetSettingsFlow(context.Background()).Id(id).XSessionToken(xSessionToken).Cookie(cookie).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.GetSettingsFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetSettingsFlow`: SettingsFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.GetSettingsFlow`: %v\n", resp) } ``` -------------------------------- ### Get Verification Flow Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md Demonstrates how to call the GetVerificationFlow function to retrieve a verification flow using its ID and an optional cookie. Ensure the SDK is imported correctly. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { id := "id_example" // string | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). cookie := "cookie_example" // string | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.GetVerificationFlow(context.Background()).Id(id).Cookie(cookie).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.GetVerificationFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetVerificationFlow`: VerificationFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.GetVerificationFlow`: %v\n", resp) } ``` -------------------------------- ### Update Verification Flow Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md Demonstrates how to call the UpdateVerificationFlow API. This is useful for completing a user verification process, for example, after they have submitted a verification code. Ensure you have the correct flow ID, update body, and optionally token and cookies. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { flow := "flow_example" // string | The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). updateVerificationFlowBody := openapiclient.updateVerificationFlowBody{UpdateVerificationFlowWithCodeMethod: openapiclient.NewUpdateVerificationFlowWithCodeMethod("Method_example")} token := "token_example" // string | Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) cookie := "cookie_example" // string | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.UpdateVerificationFlow(context.Background()).Flow(flow).UpdateVerificationFlowBody(updateVerificationFlowBody).Token(token).Cookie(cookie).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.UpdateVerificationFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateVerificationFlow`: VerificationFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.UpdateVerificationFlow`: %v\n", resp) } ``` -------------------------------- ### List All Sessions with Parameters Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Demonstrates how to list all sessions using the `ListSessions` method. It shows how to set optional parameters like `pageSize`, `pageToken`, `active`, and `expand` for filtering and pagination. Ensure the `ory/kratos-client-go` library is imported. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) active := true // bool | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) expand := []string{"Expand_example"} // []string | ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.ListSessions(context.Background()).PageSize(pageSize).PageToken(pageToken).Active(active).Expand(expand).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.ListSessions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListSessions`: []Session fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.ListSessions`: %v\n", resp) } ``` -------------------------------- ### Create Native Recovery Flow Go Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md Use this to create a recovery flow for native applications. Ensure the Ory Kratos client is properly configured. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.CreateNativeRecoveryFlow(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.CreateNativeRecoveryFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateNativeRecoveryFlow`: RecoveryFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.CreateNativeRecoveryFlow`: %v\n", resp) } ``` -------------------------------- ### Type Methods Source: https://github.com/ory/kratos-client-go/blob/master/docs/UiNodeScriptAttributes.md Provides methods to get, get with boolean check, and set the Type attribute. ```APIDOC ## GetType ### Description Retrieves the value of the Type field. If the field is not set, it returns the zero value for a string. ### Method `GetType()` ### Parameters None ### Response - **string**: The value of the Type field. ## GetTypeOk ### Description Retrieves the value of the Type field and a boolean indicating if it has been set. This is useful for distinguishing between a set zero value and an unset field. ### Method `GetTypeOk()` ### Parameters None ### Response - **(*string, bool)**: A tuple containing a pointer to the Type string and a boolean. The boolean is true if the field was set, false otherwise. ## SetType ### Description Sets the Type field to the provided string value. ### Method `SetType(v string)` ### Parameters - **v** (string) - Required - The new value for the Type field. ### Request Example ```go uiNodeScriptAttributes.SetType("text/javascript") ``` ``` -------------------------------- ### Src Methods Source: https://github.com/ory/kratos-client-go/blob/master/docs/UiNodeScriptAttributes.md Provides methods to get, get with boolean check, and set the Src attribute. ```APIDOC ## GetSrc ### Description Retrieves the value of the Src field. If the field is not set, it returns the zero value for a string. ### Method `GetSrc()` ### Parameters None ### Response - **string**: The value of the Src field. ## GetSrcOk ### Description Retrieves the value of the Src field and a boolean indicating if it has been set. This is useful for distinguishing between a set zero value and an unset field. ### Method `GetSrcOk()` ### Parameters None ### Response - **(*string, bool)**: A tuple containing a pointer to the Src string and a boolean. The boolean is true if the field was set, false otherwise. ## SetSrc ### Description Sets the Src field to the provided string value. ### Method `SetSrc(v string)` ### Parameters - **v** (string) - Required - The new value for the Src field. ### Request Example ```go uiNodeScriptAttributes.SetSrc("/path/to/script.js") ``` ``` -------------------------------- ### Referrerpolicy Methods Source: https://github.com/ory/kratos-client-go/blob/master/docs/UiNodeScriptAttributes.md Provides methods to get, get with boolean check, and set the Referrerpolicy attribute. ```APIDOC ## GetReferrerpolicy ### Description Retrieves the value of the Referrerpolicy field. If the field is not set, it returns the zero value for a string. ### Method `GetReferrerpolicy()` ### Parameters None ### Response - **string**: The value of the Referrerpolicy field. ## GetReferrerpolicyOk ### Description Retrieves the value of the Referrerpolicy field and a boolean indicating if it has been set. This is useful for distinguishing between a set zero value and an unset field. ### Method `GetReferrerpolicyOk()` ### Parameters None ### Response - **(*string, bool)**: A tuple containing a pointer to the Referrerpolicy string and a boolean. The boolean is true if the field was set, false otherwise. ## SetReferrerpolicy ### Description Sets the Referrerpolicy field to the provided string value. ### Method `SetReferrerpolicy(v string)` ### Parameters - **v** (string) - Required - The new value for the Referrerpolicy field. ### Request Example ```go uiNodeScriptAttributes.SetReferrerpolicy("no-referrer-when-downgrade") ``` ``` -------------------------------- ### Instantiate IsReady503Response with Defaults Source: https://github.com/ory/kratos-client-go/blob/master/docs/IsReady503Response.md Use this constructor to create a new IsReady503Response object with default values. This is suitable when no specific errors need to be reported initially. ```go func NewIsReady503ResponseWithDefaults() *IsReady503Response { return &IsReady503Response{} } ``` -------------------------------- ### Create Native Registration Flow Go Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md Initiates a registration flow for native applications. Optional parameters like returnTo, organization, and identitySchema can be provided to customize the flow. Ensure the Ory Kratos client is properly configured. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { returnSessionTokenExchangeCode := true // bool | EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) returnTo := "returnTo_example" // string | The URL to return the browser to after the flow was completed. (optional) organization := "organization_example" // string | An optional organization ID that should be used to register this user. This parameter is only effective in the Ory Network. (optional) identitySchema := "identitySchema_example" // string | An optional identity schema to use for the registration flow. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.CreateNativeRegistrationFlow(context.Background()).ReturnSessionTokenExchangeCode(returnSessionTokenExchangeCode).ReturnTo(returnTo).Organization(organization).IdentitySchema(identitySchema).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.CreateNativeRegistrationFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateNativeRegistrationFlow`: RegistrationFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.CreateNativeRegistrationFlow`: %v\n", resp) } ``` -------------------------------- ### Unlink Methods Source: https://github.com/ory/kratos-client-go/blob/master/docs/UpdateSettingsFlowWithSamlMethod.md Provides methods to get, get with ok check, set, and check for the presence of the Unlink field. ```APIDOC ## GetUnlink ### Description Retrieves the value of the Unlink field. ### Method `GetUnlink()` ### Parameters None ### Response - `string`: The value of the Unlink field, or its zero value if nil. ## GetUnlinkOk ### Description Retrieves the value of the Unlink field and a boolean indicating if it was set. ### Method `GetUnlinkOk()` ### Parameters None ### Response - `*string`: A pointer to the Unlink field if set, otherwise the zero value. - `bool`: True if the Unlink field has been set, false otherwise. ## SetUnlink ### Description Sets the Unlink field to the provided value. ### Method `SetUnlink(v string)` ### Parameters - **v** (`string`) - The value to set for the Unlink field. ### Response None ## HasUnlink ### Description Checks if the Unlink field has been set. ### Method `HasUnlink()` ### Parameters None ### Response - `bool`: True if the Unlink field has been set, false otherwise. ``` -------------------------------- ### List Identity Schemas in Go Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Demonstrates how to list all identity schemas using the Go client library. It shows how to set pagination parameters like perPage, page, pageSize, and pageToken. This snippet requires the Ory Kratos client library for Go. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { perPage := int64(789) // int64 | Deprecated Items per Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This is the number of items per page. (optional) (default to 250) page := int64(789) // int64 | Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) pageSize := int64(789) // int64 | Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.ListIdentitySchemas(context.Background()).PerPage(perPage).Page(page).PageSize(pageSize).PageToken(pageToken).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.ListIdentitySchemas``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListIdentitySchemas`: []IdentitySchemaContainer fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.ListIdentitySchemas`: %v\n", resp) } ``` -------------------------------- ### TransientPayload Methods Source: https://github.com/ory/kratos-client-go/blob/master/docs/UpdateSettingsFlowWithSamlMethod.md Provides methods to get, get with ok check, set, and check for the presence of the TransientPayload field. ```APIDOC ## GetTransientPayload ### Description Retrieves the value of the TransientPayload field. ### Method `GetTransientPayload()` ### Parameters None ### Response - `map[string]interface{}`: The value of the TransientPayload field, or its zero value if nil. ## GetTransientPayloadOk ### Description Retrieves the value of the TransientPayload field and a boolean indicating if it was set. ### Method `GetTransientPayloadOk()` ### Parameters None ### Response - `*map[string]interface{}`: A pointer to the TransientPayload field if set, otherwise the zero value. - `bool`: True if the TransientPayload field has been set, false otherwise. ## SetTransientPayload ### Description Sets the TransientPayload field to the provided value. ### Method `SetTransientPayload(v map[string]interface{})` ### Parameters - **v** (`map[string]interface{}`) - The value to set for the TransientPayload field. ### Response None ## HasTransientPayload ### Description Checks if the TransientPayload field has been set. ### Method `HasTransientPayload()` ### Parameters None ### Response - `bool`: True if the TransientPayload field has been set, false otherwise. ``` -------------------------------- ### Instantiate IsReady503Response with Errors Source: https://github.com/ory/kratos-client-go/blob/master/docs/IsReady503Response.md Use this constructor to create a new IsReady503Response object and initialize it with a map of errors. This is useful when the service is not ready and you need to report specific error details. ```go func NewIsReady503Response(errors map[string]string) *IsReady503Response { return &IsReady503Response{Errors: errors} } ``` -------------------------------- ### ListIdentitySchemas Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Get all Identity Schemas. ```APIDOC ## Get /schemas ### Description Get all Identity Schemas. ### Method Get ### Endpoint /schemas ``` -------------------------------- ### Instantiate GetVersion200Response with Version Source: https://github.com/ory/kratos-client-go/blob/master/docs/GetVersion200Response.md Use this constructor to create a new GetVersion200Response object and set the version. It ensures required properties are set. ```go func NewGetVersion200Response(version string) *GetVersion200Response { return &GetVersion200Response{Version: version} } ``` -------------------------------- ### GetSession Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Get a Session by its ID. ```APIDOC ## Get /admin/sessions/{id} ### Description Get a Session by its ID. ### Method Get ### Endpoint /admin/sessions/{id} ``` -------------------------------- ### GetIdentity Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Get an Identity by its ID. ```APIDOC ## Get /admin/identities/{id} ### Description Get an Identity by its ID. ### Method Get ### Endpoint /admin/identities/{id} ``` -------------------------------- ### ExtendSession Go Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Use this snippet to extend a session by providing the session ID. Ensure the Ory Kratos Go client is imported and configured. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { id := "id_example" // string | ID is the session's ID. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.ExtendSession(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.ExtendSession``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ExtendSession`: Session fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.ExtendSession`: %v\n", resp) } ``` -------------------------------- ### GetIdentityByExternalID Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Get an Identity by its External ID. ```APIDOC ## Get /admin/identities/by/external/{externalID} ### Description Get an Identity by its External ID. ### Method Get ### Endpoint /admin/identities/by/external/{externalID} ``` -------------------------------- ### Instantiate GetVersion200Response with Defaults Source: https://github.com/ory/kratos-client-go/blob/master/docs/GetVersion200Response.md Use this constructor to create a new GetVersion200Response object with default values assigned. It does not guarantee all required properties are set. ```go func NewGetVersion200ResponseWithDefaults() *GetVersion200Response { return &GetVersion200Response{} } ``` -------------------------------- ### Get ClientName in Go Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Retrieves the ClientName field. Returns the zero value if the field is nil. ```go func (o *OAuth2Client) GetClientName() string ``` -------------------------------- ### Instantiate IsAlive200Response with Defaults Source: https://github.com/ory/kratos-client-go/blob/master/docs/IsAlive200Response.md Use this constructor to create a new IsAlive200Response object with default values assigned. ```go func NewIsAlive200ResponseWithDefaults() *IsAlive200Response { return &IsAlive200Response{Status: "ok"} } ``` -------------------------------- ### NewContinueWithRedirectBrowserTo Constructor Source: https://github.com/ory/kratos-client-go/blob/master/docs/ContinueWithRedirectBrowserTo.md Instantiates a new ContinueWithRedirectBrowserTo object. Use this constructor when all required properties are known. ```go func NewContinueWithRedirectBrowserTo(action string, redirectBrowserTo string, ) *ContinueWithRedirectBrowserTo { return &ContinueWithRedirectBrowserTo{ Action: action, RedirectBrowserTo: redirectBrowserTo, } } ``` -------------------------------- ### VerifiableIdentityAddress Getters and Setters Source: https://github.com/ory/kratos-client-go/blob/master/docs/VerifiableIdentityAddress.md Provides documentation for methods related to the VerifiedAt and Via fields of the VerifiableIdentityAddress. This includes functions to get the value, get the value along with a boolean indicating if it's set, set the value, and check if the value has been set. ```APIDOC ## VerifiableIdentityAddress Methods ### GetVerifiedAt #### Description Returns the `VerifiedAt` field if non-nil, otherwise returns the zero value. #### Method `func (o *VerifiableIdentityAddress) GetVerifiedAt() time.Time` ### GetVerifiedAtOk #### Description Returns a tuple with the `VerifiedAt` field if it's non-nil, otherwise returns the zero value, and a boolean to check if the value has been set. #### Method `func (o *VerifiableIdentityAddress) GetVerifiedAtOk() (*time.Time, bool)` ### SetVerifiedAt #### Description Sets the `VerifiedAt` field to the given value. #### Method `func (o *VerifiableIdentityAddress) SetVerifiedAt(v time.Time)` ### HasVerifiedAt #### Description Returns a boolean indicating if the `VerifiedAt` field has been set. #### Method `func (o *VerifiableIdentityAddress) HasVerifiedAt() bool` ### GetVia #### Description Returns the `Via` field if non-nil, otherwise returns the zero value. #### Method `func (o *VerifiableIdentityAddress) GetVia() string` ### GetViaOk #### Description Returns a tuple with the `Via` field if it's non-nil, otherwise returns the zero value, and a boolean to check if the value has been set. #### Method `func (o *VerifiableIdentityAddress) GetViaOk() (*string, bool)` ### SetVia #### Description Sets the `Via` field to the given value. #### Method `func (o *VerifiableIdentityAddress) SetVia(v string)` ``` -------------------------------- ### JWKS URI Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Method for getting the JwksUri field. ```APIDOC ## GetJwksUri ### Description GetJwksUri returns the JwksUri field if non-nil, zero value otherwise. ### Method Signature `func (o *OAuth2Client) GetJwksUri() string` ``` -------------------------------- ### List Identities with Various Parameters in Go Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Demonstrates how to list identities using the Ory Kratos Go client. It shows how to set various query parameters including pagination, consistency level, filtering by IDs, credentials, and organization. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { perPage := int64(789) // int64 | Deprecated Items per Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This is the number of items per page. (optional) (default to 250) page := int64(789) // int64 | Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) pageSize := int64(789) // int64 | Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) (default to 250) pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) consistency := "consistency_example" // string | Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with `ory patch project --replace '/previews/default_read_consistency_level="strong"'`. Setting the default consistency level to `eventual` may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: `GET /admin/identities` This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps. (optional) ids := []string{"Inner_example"} // []string | Retrieve multiple identities by their IDs. This parameter has the following limitations: Duplicate or non-existent IDs are ignored. The order of returned IDs may be different from the request. This filter does not support pagination. You must implement your own pagination as the maximum number of items returned by this endpoint may not exceed a certain threshold (currently 500). (optional) credentialsIdentifier := "credentialsIdentifier_example" // string | CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) previewCredentialsIdentifierSimilar := "previewCredentialsIdentifierSimilar_example" // string | This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) includeCredential := []string{"Inner_example"} // []string | Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) organizationId := "organizationId_example" // string | List identities that belong to a specific organization. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.ListIdentities(context.Background()).PerPage(perPage).Page(page).PageSize(pageSize).PageToken(pageToken).Consistency(consistency).Ids(ids).CredentialsIdentifier(credentialsIdentifier).PreviewCredentialsIdentifierSimilar(previewCredentialsIdentifierSimilar).IncludeCredential(includeCredential).OrganizationId(organizationId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.ListIdentities``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ListIdentities`: []Identity fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.ListIdentities`: %v\n", resp) } ``` -------------------------------- ### GetIdentitySchema Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Get a specific Identity JSON Schema by its ID. ```APIDOC ## Get /schemas/{id} ### Description Get a specific Identity JSON Schema by its ID. ### Method Get ### Endpoint /schemas/{id} ``` -------------------------------- ### NewContinueWithRedirectBrowserToWithDefaults Constructor Source: https://github.com/ory/kratos-client-go/blob/master/docs/ContinueWithRedirectBrowserTo.md Instantiates a new ContinueWithRedirectBrowserTo object with default values. Use this when default properties are sufficient and required properties are not yet known. ```go func NewContinueWithRedirectBrowserToWithDefaults() *ContinueWithRedirectBrowserTo { return &ContinueWithRedirectBrowserTo{} } ``` -------------------------------- ### JWKS Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Methods for getting, setting, checking, and unsetting the Jwks field. ```APIDOC ## GetJwks ### Description GetJwks returns the Jwks field if non-nil, zero value otherwise. ### Method Signature `func (o *OAuth2Client) GetJwks() interface{}` ## GetJwksOk ### Description GetJwksOk returns a tuple with the Jwks field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method Signature `func (o *OAuth2Client) GetJwksOk() (*interface{}, bool)` ## SetJwks ### Description SetJwks sets Jwks field to given value. ### Method Signature `func (o *OAuth2Client) SetJwks(v interface{})` ## HasJwks ### Description HasJwks returns a boolean if a field has been set. ### Method Signature `func (o *OAuth2Client) HasJwks() bool` ## SetJwksNil ### Description SetJwksNil sets the value for Jwks to be an explicit nil. ### Method Signature `func (o *OAuth2Client) SetJwksNil(b bool)` ## UnsetJwks ### Description UnsetJwks ensures that no value is present for Jwks, not even an explicit nil. ### Method Signature `func (o *OAuth2Client) UnsetJwks()` ``` -------------------------------- ### Update Identity Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Demonstrates how to update an identity by providing its ID and an UpdateIdentityBody. Ensure the Ory Kratos Go client is configured and imported. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { id := "id_example" // string | ID must be set to the ID of identity you want to update updateIdentityBody := *openapiclient.NewUpdateIdentityBody("SchemaId_example", "State_example", map[string]interface{}(123)) // UpdateIdentityBody | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.UpdateIdentity(context.Background(), id).UpdateIdentityBody(updateIdentityBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.UpdateIdentity``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateIdentity`: Identity fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.UpdateIdentity`: %v\n", resp) } ``` -------------------------------- ### Update Settings Flow Example Source: https://github.com/ory/kratos-client-go/blob/master/docs/FrontendAPI.md This Go code snippet demonstrates how to call the UpdateSettingsFlow API. It shows how to set the flow ID, update body, session token, and cookies. Ensure the correct flow ID and update body are provided. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { flow := "flow_example" // string | The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). updateSettingsFlowBody := openapiclient.updateSettingsFlowBody{UpdateSettingsFlowWithLookupMethod: openapiclient.NewUpdateSettingsFlowWithLookupMethod("Method_example")} xSessionToken := "xSessionToken_example" // string | The Session Token of the Identity performing the settings flow. (optional) cookie := "cookie_example" // string | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.FrontendAPI.UpdateSettingsFlow(context.Background()).Flow(flow).UpdateSettingsFlowBody(updateSettingsFlowBody).XSessionToken(xSessionToken).Cookie(cookie).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FrontendAPI.UpdateSettingsFlow``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateSettingsFlow`: SettingsFlow fmt.Fprintf(os.Stdout, "Response from `FrontendAPI.UpdateSettingsFlow`: %v\n", resp) } ``` -------------------------------- ### Grant Types Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Methods for getting, setting, and checking the GrantTypes field. ```APIDOC ## GetGrantTypes ### Description GetGrantTypes returns the GrantTypes field if non-nil, zero value otherwise. ### Method Signature `func (o *OAuth2Client) GetGrantTypes() []string` ## GetGrantTypesOk ### Description GetGrantTypesOk returns a tuple with the GrantTypes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method Signature `func (o *OAuth2Client) GetGrantTypesOk() (*[]string, bool)` ## SetGrantTypes ### Description SetGrantTypes sets GrantTypes field to given value. ### Method Signature `func (o *OAuth2Client) SetGrantTypes(v []string)` ## HasGrantTypes ### Description HasGrantTypes returns a boolean if a field has been set. ### Method Signature `func (o *OAuth2Client) HasGrantTypes() bool` ``` -------------------------------- ### Instantiate New Version Object with Defaults Source: https://github.com/ory/kratos-client-go/blob/master/docs/Version.md Use NewVersionWithDefaults to create a new Version object, assigning only default values to properties that have them defined. ```go func NewVersionWithDefaults() *Version { return &Version{} } ``` -------------------------------- ### UpdatedAt Management Source: https://github.com/ory/kratos-client-go/blob/master/docs/Identity.md Methods for getting and checking the UpdatedAt field of an identity. ```APIDOC ## GetUpdatedAt ### Description Retrieves the UpdatedAt field. Returns the zero value if the field is nil. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **UpdatedAt** (time.Time) - The UpdatedAt value. ## GetUpdatedAtOk ### Description Retrieves a tuple containing the UpdatedAt field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **UpdatedAt** (*time.Time) - A pointer to the UpdatedAt value. - **isSet** (bool) - True if the UpdatedAt has been set, false otherwise. ``` -------------------------------- ### Initialize UpdateRegistrationFlowWithCodeMethod Source: https://github.com/ory/kratos-client-go/blob/master/docs/UpdateRegistrationFlowWithCodeMethod.md Use `NewUpdateRegistrationFlowWithCodeMethod` to create a new instance, ensuring required properties like `method` and `traits` are set. The `method` must be set to `code` for this flow. ```go traits := map[string]interface{}{ "email": "john.doe@example.com", } updateFlow := NewUpdateRegistrationFlowWithCodeMethod("code", traits) ``` -------------------------------- ### SchemaUrl Management Source: https://github.com/ory/kratos-client-go/blob/master/docs/Identity.md Methods for getting and setting the SchemaUrl field of an identity. ```APIDOC ## GetSchemaUrl ### Description Retrieves the SchemaUrl field. Returns the zero value if the field is nil. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **SchemaUrl** (string) - The SchemaUrl value. ## GetSchemaUrlOk ### Description Retrieves a tuple containing the SchemaUrl field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **SchemaUrl** (*string) - A pointer to the SchemaUrl value. - **isSet** (bool) - True if the SchemaUrl has been set, false otherwise. ## SetSchemaUrl ### Description Sets the SchemaUrl field to the provided string value. ### Method POST ### Endpoint N/A (SDK method) ### Parameters - **v** (string) - Required - The value to set for SchemaUrl. ``` -------------------------------- ### SchemaId Management Source: https://github.com/ory/kratos-client-go/blob/master/docs/Identity.md Methods for getting and setting the SchemaId field of an identity. ```APIDOC ## GetSchemaId ### Description Retrieves the SchemaId field. Returns the zero value if the field is nil. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **SchemaId** (string) - The SchemaId value. ## GetSchemaIdOk ### Description Retrieves a tuple containing the SchemaId field and a boolean indicating if it has been set. Returns the zero value and false if not set. ### Method GET ### Endpoint N/A (SDK method) ### Parameters None ### Response #### Success Response - **SchemaId** (*string) - A pointer to the SchemaId value. - **isSet** (bool) - True if the SchemaId has been set, false otherwise. ## SetSchemaId ### Description Sets the SchemaId field to the provided string value. ### Method POST ### Endpoint N/A (SDK method) ### Parameters - **v** (string) - Required - The value to set for SchemaId. ``` -------------------------------- ### Frontchannel Logout URI Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Methods for getting, setting, and checking the FrontchannelLogoutUri field. ```APIDOC ## GetFrontchannelLogoutUri ### Description GetFrontchannelLogoutUri returns the FrontchannelLogoutUri field if non-nil, zero value otherwise. ### Method Signature `func (o *OAuth2Client) GetFrontchannelLogoutUri() string` ## GetFrontchannelLogoutUriOk ### Description GetFrontchannelLogoutUriOk returns a tuple with the FrontchannelLogoutUri field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### Method Signature `func (o *OAuth2Client) GetFrontchannelLogoutUriOk() (*string, bool)` ## SetFrontchannelLogoutUri ### Description SetFrontchannelLogoutUri sets FrontchannelLogoutUri field to given value. ### Method Signature `func (o *OAuth2Client) SetFrontchannelLogoutUri(v string)` ## HasFrontchannelLogoutUri ### Description HasFrontchannelLogoutUri returns a boolean if a field has been set. ### Method Signature `func (o *OAuth2Client) HasFrontchannelLogoutUri() bool` ``` -------------------------------- ### New VerifiableIdentityAddress Constructor Source: https://github.com/ory/kratos-client-go/blob/master/docs/VerifiableIdentityAddress.md Use this constructor to create a new VerifiableIdentityAddress object. It initializes required fields and default values. ```go func NewVerifiableIdentityAddress(status string, value string, verified bool, via string, ) *VerifiableIdentityAddress ``` -------------------------------- ### Instantiate IsAlive200Response with Status Source: https://github.com/ory/kratos-client-go/blob/master/docs/IsAlive200Response.md Use this constructor to create a new IsAlive200Response object and set its status. ```go func NewIsAlive200Response(status string, ) *IsAlive200Response { return &IsAlive200Response{Status: status} } ``` -------------------------------- ### AuthorizationCodeGrantAccessTokenLifespan Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Provides methods to get, set, and check for the presence of the AuthorizationCodeGrantAccessTokenLifespan field. ```APIDOC ## AuthorizationCodeGrantAccessTokenLifespan ### Description Provides methods to get, set, and check for the presence of the AuthorizationCodeGrantAccessTokenLifespan field. ### GetAuthorizationCodeGrantAccessTokenLifespan `func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespan() string` Returns the AuthorizationCodeGrantAccessTokenLifespan field if non-nil, zero value otherwise. ### GetAuthorizationCodeGrantAccessTokenLifespanOk `func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool)` Returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAuthorizationCodeGrantAccessTokenLifespan `func (o *OAuth2Client) SetAuthorizationCodeGrantAccessTokenLifespan(v string)` Sets AuthorizationCodeGrantAccessTokenLifespan field to given value. ### HasAuthorizationCodeGrantAccessTokenLifespan `func (o *OAuth2Client) HasAuthorizationCodeGrantAccessTokenLifespan() bool` Returns a boolean if a field has been set. ``` -------------------------------- ### Instantiate New Version Object Source: https://github.com/ory/kratos-client-go/blob/master/docs/Version.md Use NewVersion to create a new Version object. This constructor assigns default values and ensures required properties are set. ```go func NewVersion() *Version { return &Version{} } ``` -------------------------------- ### Audience Source: https://github.com/ory/kratos-client-go/blob/master/docs/OAuth2Client.md Provides methods to get, set, and check for the presence of the Audience field. ```APIDOC ## Audience ### Description Provides methods to get, set, and check for the presence of the Audience field. ### GetAudience `func (o *OAuth2Client) GetAudience() []string` Returns the Audience field if non-nil, zero value otherwise. ### GetAudienceOk `func (o *OAuth2Client) GetAudienceOk() (*[]string, bool)` Returns a tuple with the Audience field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAudience `func (o *OAuth2Client) SetAudience(v []string)` Sets Audience field to given value. ### HasAudience `func (o *OAuth2Client) HasAudience() bool` Returns a boolean if a field has been set. ``` -------------------------------- ### Get Identity with Go SDK Source: https://github.com/ory/kratos-client-go/blob/master/docs/IdentityAPI.md Demonstrates how to retrieve an identity using the Ory Kratos Go client. Ensure the SDK is imported and configured. The `id` and `includeCredential` parameters are crucial for specifying the identity to fetch and the data to include in the response. ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/kratos-client-go/v26" ) func main() { id := "id_example" // string | ID must be set to the ID of identity you want to get includeCredential := []string{"IncludeCredential_example"} // []string | Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.IdentityAPI.GetIdentity(context.Background(), id).IncludeCredential(includeCredential).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IdentityAPI.GetIdentity``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetIdentity`: Identity fmt.Fprintf(os.Stdout, "Response from `IdentityAPI.GetIdentity`: %v\n", resp) } ```