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: Unauthorize
# --- truncated at 32 KB (74 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stytch/refs/heads/main/openapi/stytch-members-api-openapi.yml