Verify Token
Verify an internal OAuth token redirected to your application upon the completion of the OAuth flow. This token is generated by Streambird and can be used to exchange for the authenticated user information and/or the original access_token
and refresh_token
of the idp providers that can be used directly with the external OAuth providers (e.g., Google, Apple, Microsoft, etc).
HTTP Request
POST /v1/auth/oauth/verify
Returns
A successful response returns user_id
, idp_session
property with data from the OAuth provider by default. Session
object in session
property if any of the session_token
, session_jwt
, or session_expires_in
is valid.
Body
-
Required
OAuthToken provided to the login/signup redirect url to authenticate the OAuth session and exchange user info and idpaccess_token
andrefresh_token
.Minimum length is
1
. -
session_expires_in number
Extend the session expiration time to N minutes from now, must be between 5 to 525600 minutes (365 days). This parameter will create a new session if there is no existing session along with a
session_token
andsession_jwt
. However, if a validsession_token
orsession_jwt
is sent in, it will extend that session by the minutes specified. If not sent in and no validsession_token
orsession_jwt
included, it will be ignored and no Streambird session will be created by default. -
session_token string
Unique session token to verify.
Minimum length is
1
. -
session_jwt string
Unique Session JWT to verify.
curl \
-X POST https://api.streambird.io/v1/auth/oauth/verify \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"token":"yRqkvNQVTwddlZV6D7S0ypSNpHlCbfYG4OAw3oUIVFFZ27UJ8R0xmRUQfNF59G9i"}'
{
"token": "yRqkvNQVTwddlZV6D7S0ypSNpHlCbfYG4OAw3oUIVFFZ27UJ8R0xmRUQfNF59G9i"
}
{
"provider_subject": "100157402424066154830",
"provider": "google",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"idp_session": {
"idp": {
"access_token": "ya29.A0ARrdaM9TnNfrdqDZmBIw7PBPjYf0HELFdxDCNC2cQRK7aqgsIfIusuCd0SJ5nx9dgGti2KU-rt_dIV7cpxasqpCpRq7VNyv-KsbC2-cn6j76p_wVmUwCKlWZ_3ZHx8WFdlIrLu-E1q3Ea_11zfmQCwuwgBMl",
"refresh_token": "1//0d2jmQJmy0z17CgYIARAAGA0SNwF-L9IrF-jEvfwE-YNr_--Cqzu7MGnmtpLu0kklcFfgJzI2FSBib9_4wh1MAs4JKbAvue2XJoI"
}
},
"session": null,
"session_token": ""
}