Get OAuth Token by SID
This request returns data for an OAuth token, targeted by secure ID.
get | /oauth/tokens/{token_sid} |
Sample
A sample GET request to get an OAuth token, targeted by secure ID:
curl -X GET \
'https://api.carrierx.com/core/v2/oauth/tokens/b3f45e4d-7d46-467b-9724-272f57ac420e' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a serialized copy of the OAuth Token object:
{
"access_token": "8bfd6c6d-6291-488a-bed1-8784c195ce87",
"client_id": "5c7965f285344165b003ce1a3202e589",
"date_created": "2024-09-11T13:46:42.211Z",
"date_expiration_access_token": "2124-08-18T13:46:42.169Z",
"date_expiration_refresh_token": "2124-08-18T13:46:42.169Z",
"date_last_accessed": null,
"ip_last_accessed": null,
"name": "test_token",
"partner_sid": "cee93bf3-5746-43fe-a1a2-822c05fef687",
"refresh_token": "ed07dcd6-dfc5-4d7b-b7b4-891441371b3e",
"scopes": [
"accesscontrol.manage",
"endpoints.manage",
"oauth.manage",
"partners.manage",
"phonenumber.manage",
"push.manage",
"shortener.manage",
"sms.manage",
"storage.manage",
"trunk_groups.manage",
"trunk_groups.trunks.manage"
],
"token_sid": "b3f45e4d-7d46-467b-9724-272f57ac420e",
"token_type": "bearer"
}
This request is enabled for Field Filtering.
Required Scopes
To get information about an OAuth token the partner must have one of the following scopes enabled:
oauth.manage_all_tokens
oauth.manage
oauth.read
Path Arguments
Parameter | Data Type | Description |
---|---|---|
token_sid required | string | The OAuth token secure ID. |
Query Arguments
Parameter | Data Type | Description |
---|---|---|
with_related | boolean | Determines if the partner information related to the OAuth token should be shown. Values accepted in this field are true and false . The default value is false . |