Retrieve the saved GitHub access token for a Member. After a successful OAuth login, Stytch will save the issued access token from the identity provider. GitHub does not issue refresh tokens, but will invalidate access tokens after very long periods of inactivity.
Get GitHub Access Token
GEThttps://test.stytch.com/v1/b2b/organizations/{organization_id}/members/{member_id}/oauth_providers/github
Path parameters
organization_id* string
member_id* string
Response fields
request_id string
status_code int
provider_type string
registrations object
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/github \
-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": "Github",
"registrations": [
{
"provider_subject": "10769150350006150715113082367",
"provider_tenant_id": "1234567",
"provider_tenant_ids": ["1234567"],
"access_token": "eyJ...",
"scopes": ["user", "read:org"]
}
]
}