{ "components": { "schemas": { "oauth.v1.certs": { "type": "object", "properties": { "keys": { "nullable": true, "description": "A collection of certificates" }, "url": { "type": "string", "format": "uri", "nullable": true } } }, "oauth.v1.openid_discovery": { "type": "object", "properties": { "issuer": { "type": "string", "format": "uri", "nullable": true, "description": "The issuer URL" }, "authorization_endpoint": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of authorization endpoint" }, "device_authorization_endpoint": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of device code authorization endpoint" }, "token_endpoint": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of token endpoint" }, "userinfo_endpoint": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of user info endpoint" }, "revocation_endpoint": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of revocation endpoint" }, "jwk_uri": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of public JWK endpoint" }, "response_type_supported": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of response type supported for identity token" }, "subject_type_supported": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of subject supported for identity token" }, "id_token_signing_alg_values_supported": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of JWS signing algorithms supported for identity token" }, "scopes_supported": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of scopes supported identity token" }, "claims_supported": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of claims supported for identity token" }, "url": { "type": "string", "format": "uri", "nullable": true } } }, "oauth.v1.token": { "type": "object", "properties": { "access_token": { "type": "string", "nullable": true, "description": "Token which carries the necessary information to access a Twilio resource directly" }, "refresh_token": { "type": "string", "nullable": true, "description": "Token which carries the information necessary to get a new access token" }, "id_token": { "type": "string", "nullable": true }, "refresh_token_expires_at": { "type": "string", "format": "date-time", "nullable": true, "description": "The RFC 2822 date and time in GMT when the refresh token expires" }, "access_token_expires_at": { "type": "string", "format": "date-time", "nullable": true, "description": "The RFC 2822 date and time in GMT when the access token expires" } } }, "oauth.v1.user_info": { "type": "object", "properties": { "user_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^US[0-9a-fA-F]{32}$", "nullable": true, "description": "The user sid" }, "first_name": { "type": "string", "nullable": true, "description": "The first name of the end-user" }, "last_name": { "type": "string", "nullable": true, "description": "The last name of the end-user" }, "friendly_name": { "type": "string", "nullable": true, "description": "The friendly name of the end-user" }, "email": { "type": "string", "nullable": true, "description": "The end-user's preferred email address" }, "url": { "type": "string", "format": "uri", "nullable": true } } } }, "securitySchemes": { "accountSid_authToken": { "type": "http", "scheme": "basic" } } }, "info": { "title": "Twilio - Oauth", "description": "This is the public Twilio REST API.", "termsOfService": "https://www.twilio.com/legal/tos", "contact": { "name": "Twilio Support", "url": "https://support.twilio.com", "email": "support@twilio.com" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.37.1" }, "openapi": "3.0.1", "paths": { "/v1/certs": { "servers": [ { "url": "https://oauth.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "keys" ], "pathType": "instance", "mountName": "oauth" }, "get": { "description": "Fetches public JWKs", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/oauth.v1.certs" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchCerts", "x-maturity": [ "GA" ] } }, "/v1/well-known/openid-configuration": { "servers": [ { "url": "https://oauth.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "issuer", "authorization_endpoint", "device_authorization_endpoint", "token_endpoint", "userinfo_endpoint", "revocation_endpoint", "jwk_uri", "response_type_supported", "subject_type_supported", "id_token_signing_alg_values_supported", "scopes_supported", "claims_supported" ], "pathType": "instance", "mountName": "openid_discovery" }, "get": { "description": "Fetch configuration details about the OpenID Connect Authorization Server", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/oauth.v1.openid_discovery" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchOpenidDiscovery", "x-maturity": [ "GA" ] } }, "/v1/token": { "servers": [ { "url": "https://oauth.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "access_token", "access_token_expires_at" ], "pathType": "list" }, "post": { "description": "Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant", "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/oauth.v1.token" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateToken", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateTokenRequest", "properties": { "GrantType": { "type": "string", "description": "Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token." }, "ClientSid": { "type": "string", "description": "A 34 character string that uniquely identifies this OAuth App." }, "ClientSecret": { "type": "string", "description": "The credential for confidential OAuth App." }, "Code": { "type": "string", "description": "JWT token related to the authorization code grant type." }, "CodeVerifier": { "type": "string", "description": "A code which is generation cryptographically." }, "DeviceCode": { "type": "string", "description": "JWT token related to the device code grant type." }, "RefreshToken": { "type": "string", "description": "JWT token related to the refresh token grant type." }, "DeviceId": { "type": "string", "description": "The Id of the device associated with the token (refresh token)." } }, "required": [ "GrantType", "ClientSid" ] } } } } } }, "/v1/userinfo": { "servers": [ { "url": "https://oauth.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "user_sid" ], "pathType": "instance", "mountName": "user_info" }, "get": { "description": "Retrieves the consented UserInfo and other claims about the logged-in subject (end-user).", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/oauth.v1.user_info" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchUserInfo", "x-maturity": [ "GA" ] } } }, "servers": [ { "url": "https://oauth.twilio.com" } ], "x-maturity": [ { "name": "GA", "description": "This product is Generally Available." } ] }