openapi: 3.0.3 info: title: Stytch B2B Authentication Application Members API version: 2.0.0 description: Stytch's B2B API for multi-tenant authentication. Supports Organizations, Members, SSO (SAML/OIDC), Magic Links, OTP, OAuth, Discovery, Sessions, B2B RBAC, SCIM, TOTP, Recovery Codes, Passwords, Impersonation, and the B2B IDP. contact: name: Stytch url: https://stytch.com/docs license: name: Proprietary servers: - url: https://api.stytch.com description: Production - url: https://test.stytch.com description: Test tags: - name: Members paths: /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google: get: summary: Google operationId: api_organization_v1_organizations_members_oauth_providers_Google tags: - Members description: "Retrieve the saved Google access token and ID token for a member. After a successful OAuth login, Stytch will save the \nissued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the \naccess token automatically.\n\nGoogle One Tap does not return access tokens. If the member has only authenticated through Google One Tap and not through a regular Google OAuth flow, this endpoint will not return any tokens.\n\n__Note:__ Google does not issue a refresh token on every login, and refresh tokens may expire if unused.\nTo force a refresh token to be issued, pass the `?provider_prompt=consent` query param into the\n[Start Google OAuth flow](https://stytch.com/docs/b2b/api/oauth-google-start) endpoint." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: include_refresh_token in: query required: false schema: type: boolean description: Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_oauth_providers_GoogleResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OAuthProviders.Google(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/oauthproviders\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &oauthproviders.ProviderInformationParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OAuthProviders.Google(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n ProviderInformationRequest params = new ProviderInformationRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getOAuthProviders().google(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oauthProviders.google(\n ProviderInformationRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oauthProviders.google(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oauth_providers->google([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oauth_providers.google(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oauth_providers.google(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_oauth_providers::ProviderInformationRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oauth_providers.google(\n ProviderInformationRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/google\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oauth_providers/google \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft: get: summary: Microsoft operationId: api_organization_v1_organizations_members_oauth_providers_Microsoft tags: - Members description: 'Retrieve the saved Microsoft access token and ID token for a member. After a successful OAuth login, Stytch will save the issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the access token automatically.' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: include_refresh_token in: query required: false schema: type: boolean description: Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_oauth_providers_MicrosoftResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OAuthProviders.Microsoft(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/oauthproviders\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &oauthproviders.ProviderInformationParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OAuthProviders.Microsoft(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n ProviderInformationRequest params = new ProviderInformationRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getOAuthProviders().microsoft(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oauthProviders.microsoft(\n ProviderInformationRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oauthProviders.microsoft(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oauth_providers->microsoft([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oauth_providers.microsoft(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oauth_providers.microsoft(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_oauth_providers::ProviderInformationRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oauth_providers.microsoft(\n ProviderInformationRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/microsoft\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oauth_providers/microsoft \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack: get: summary: Slack operationId: api_organization_v1_organizations_members_oauth_providers_Slack tags: - Members description: "Retrieve the saved Slack access token and ID token for a member. After a successful OAuth login, Stytch will save the \nissued access token and ID token from the identity provider." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_oauth_providers_SlackResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OAuthProviders.Slack(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/oauthproviders\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &oauthproviders.SlackParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OAuthProviders.Slack(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.SlackRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n SlackRequest params = new SlackRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getOAuthProviders().slack(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.SlackRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oauthProviders.slack(\n SlackRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oauthProviders.slack(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oauth_providers->slack([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oauth_providers.slack(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oauth_providers.slack(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_oauth_providers::SlackRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oauth_providers.slack(\n SlackRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/slack\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oauth_providers/slack \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot: get: summary: Hubspot operationId: api_organization_v1_organizations_members_oauth_providers_Hubspot tags: - Members description: "Retrieve the saved Hubspot access token and ID token for a member. After a successful OAuth login, Stytch will save the \nissued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the \naccess token automatically." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: include_refresh_token in: query required: false schema: type: boolean description: Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_oauth_providers_HubspotResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OAuthProviders.Hubspot(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/oauthproviders\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &oauthproviders.ProviderInformationParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OAuthProviders.Hubspot(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n ProviderInformationRequest params = new ProviderInformationRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getOAuthProviders().hubspot(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oauthProviders.hubspot(\n ProviderInformationRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oauthProviders.hubspot(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oauth_providers->hubspot([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oauth_providers.hubspot(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oauth_providers.hubspot(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_oauth_providers::ProviderInformationRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oauth_providers.hubspot(\n ProviderInformationRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oauth_providers/hubspot \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github: get: summary: Github operationId: api_organization_v1_organizations_members_oauth_providers_Github tags: - Members description: "Retrieve the saved GitHub access token for a Member. After a successful OAuth login, Stytch will save the \nissued access token from the identity provider. GitHub does not issue refresh tokens, but will invalidate access\ntokens after very long periods of inactivity." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: include_refresh_token in: query required: false schema: type: boolean description: Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_oauth_providers_GithubResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OAuthProviders.Github(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/oauthproviders\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &oauthproviders.ProviderInformationParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OAuthProviders.Github(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n ProviderInformationRequest params = new ProviderInformationRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getOAuthProviders().github(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersoauthproviders.ProviderInformationRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oauthProviders.github(\n ProviderInformationRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oauthProviders.github(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oauth_providers->github([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oauth_providers.github(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oauth_providers.github(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_oauth_providers::ProviderInformationRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oauth_providers.github(\n ProviderInformationRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oauth_providers/github \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke: post: summary: Revoke operationId: api_organization_v1_organizations_members_connected_apps_Revoke tags: - Members description: 'Revoke Connected App revokes a Connected App''s access to a Member and revokes all active tokens that have been created on the Member''s behalf. New tokens cannot be created until the Member completes a new authorization flow with the Connected App.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_connected_apps_RevokeRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: connected_app_id in: path required: true schema: type: string description: The ID of the Connected App. description: The ID of the Connected App. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_connected_apps_RevokeResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n connected_app_id: \"${exampleConnectedAppClientID}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.ConnectedApps.Revoke(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members/connectedapps\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &connectedapps.RevokeParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t\tConnectedAppID: \"${exampleConnectedAppClientID}\",\n\t}\n\n\toptions := &connectedapps.RevokeParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.ConnectedApps.Revoke(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembersconnectedapps.RevokeRequest;\nimport com.stytch.java.b2b.models.organizationsmembersconnectedapps.RevokeRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n RevokeRequest params = new RevokeRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n params.setConnectedAppId(\"${exampleConnectedAppClientID}\");\n\n RevokeRequestOptions options = new RevokeRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getConnectedApps().revoke(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembersconnectedapps.RevokeRequest\nimport com.stytch.java.b2b.models.organizationsmembersconnectedapps.RevokeRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.connectedApps.revoke(\n RevokeRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n connectedAppId = \"${exampleConnectedAppClientID}\",\n ),\n RevokeRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n connected_app_id: \"${exampleConnectedAppClientID}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.connectedApps.revoke(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->connected_apps->revoke([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n 'connected_app_id' => '${exampleConnectedAppClientID}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members_connected_apps import RevokeRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.connected_apps.revoke(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n connected_app_id=\"${exampleConnectedAppClientID}\",\n method_options=RevokeRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.connected_apps.revoke(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n connected_app_id: \"${exampleConnectedAppClientID}\",\n method_options: StytchB2B::Organizations::Members::ConnectedApps::RevokeRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members_connected_apps::RevokeRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.connected_apps.revoke(\n RevokeRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n connected_app_id: \"${exampleConnectedAppClientID}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps/{connected_app_id}/revoke\ncurl --request POST \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/connected_apps/${exampleConnectedAppClientID}/revoke \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" components: schemas: api_organization_v1_organizations_members_oauth_providers_MicrosoftResponse: type: object properties: request_id: type: string description: 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. provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. access_token_expires_in: type: integer format: int32 description: The number of seconds until the access token expires. id_token: type: string description: The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. status_code: type: integer format: int32 description: 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. refresh_token: type: string description: The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API. required: - request_id - provider_type - provider_subject - access_token - access_token_expires_in - id_token - scopes - status_code api_organization_v1_GithubProviderInfo: type: object properties: provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. provider_tenant_ids: type: array items: type: string description: All tenant IDs returned by the OAuth provider. These is typically used to identify organizations or groups within the provider's domain. For example, in HubSpot this is a Hub ID, in Slack this is the Workspace ID, and in GitHub this is an organization ID. Some OAuth providers do not return tenant IDs, some providers are guaranteed to return one, and some may return multiple. This field will always be populated if at least one tenant ID was returned from the OAuth provider and developers should prefer this field over `provider_tenant_id`. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. required: - provider_subject - provider_tenant_ids - access_token - scopes api_organization_v1_organizations_members_connected_apps_RevokeResponse: type: object properties: request_id: type: string description: 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. status_code: type: integer format: int32 required: - request_id - status_code api_organization_v1_organizations_members_oauth_providers_GoogleResponse: type: object properties: request_id: type: string description: 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. provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. id_token: type: string description: The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. status_code: type: integer format: int32 description: 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. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. access_token_expires_in: type: integer format: int32 description: The number of seconds until the access token expires. refresh_token: type: string description: The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API. required: - request_id - provider_type - provider_subject - id_token - scopes - status_code api_organization_v1_HubspotProviderInfo: type: object properties: provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. provider_tenant_id: type: string description: The tenant ID returned by the OAuth provider. This is typically used to identify an organization or group within the provider's domain. For example, in HubSpot this is a Hub ID, in Slack this is the Workspace ID, and in GitHub this is an organization ID. This field will only be populated if exactly one tenant ID is returned from a successful OAuth authentication and developers should prefer `provider_tenant_ids` over this since it accounts for the possibility of an OAuth provider yielding multiple tenant IDs. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. access_token_expires_in: type: integer format: int32 description: The number of seconds until the access token expires. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. refresh_token: type: string description: The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API. required: - provider_subject - provider_tenant_id - access_token - access_token_expires_in - scopes api_organization_v1_organizations_members_oauth_providers_SlackResponse: type: object properties: request_id: type: string description: 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. provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_SlackProviderInfo' description: A list of tokens the member is registered with. status_code: type: integer format: int32 description: 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. required: - request_id - provider_type - registrations - status_code api_organization_v1_organizations_members_oauth_providers_HubspotResponse: type: object properties: request_id: type: string description: 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. provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_HubspotProviderInfo' description: A list of tokens the member is registered with. status_code: type: integer format: int32 description: 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. required: - request_id - provider_type - registrations - status_code api_organization_v1_organizations_members_connected_apps_RevokeRequest: type: object properties: {} description: Request type api_organization_v1_SlackProviderInfo: type: object properties: provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. provider_tenant_id: type: string description: The tenant ID returned by the OAuth provider. This is typically used to identify an organization or group within the provider's domain. For example, in HubSpot this is a Hub ID, in Slack this is the Workspace ID, and in GitHub this is an organization ID. This field will only be populated if exactly one tenant ID is returned from a successful OAuth authentication and developers should prefer `provider_tenant_ids` over this since it accounts for the possibility of an OAuth provider yielding multiple tenant IDs. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. bot_access_token: type: string description: The `access_token` that you may use to access data as a bot application in Slack. Use in conjunction with `bot_scopes`. bot_scopes: type: array items: type: string description: The scopes that the bot application has access to in Slack. required: - provider_subject - provider_tenant_id - access_token - scopes - bot_access_token - bot_scopes api_organization_v1_organizations_members_oauth_providers_GithubResponse: type: object properties: request_id: type: string description: 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. provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_GithubProviderInfo' description: A list of tokens the member is registered with. status_code: type: integer format: int32 description: 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. required: - request_id - provider_type - registrations - status_code securitySchemes: basicAuth: type: http scheme: basic