B2B Saas Authentication

/

API reference

/

OAuth

/

Token

/

Get HubSpot Access Token

Get Hubspot Access Token

GEThttps://test.stytch.com/v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/hubspot

Retrieve the saved Hubspot 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.


Path parameters


organization_id*string

member_id*string

Query parameters


include_refresh_tokenboolean

Response fields


request_idstring

status_codeint

provider_typestring

registrationsobject
curl --request GET \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931/members/member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f/oauth_providers/hubspot \
  -u 'PROJECT_ID:SECRET' \
  -H 'Content-Type: application/json'

RESPONSE

200
{
	"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
	"status_code": 200,
	"provider_type": "Hubspot",
	"registrations": [
		"provider_subject": "10769150350006150715113082367",
		"provider_tenant_id": "1234567",
		"access_token": "eyJ...",
		"access_token_expires_in": 3600,
		"scopes": ["read:users", "write:users"]
	]
}