# 51XXX: Twilio Authorization Errors The following document defines all Twilio Authorization errors. [See here](table.md) for a table view. * [510XX: Authorization Errors](#510XX-authorization-errors) * [51007: Token authentication is rejected by authentication service](#51007-token-authentication-is-rejected-by-authentication-service) ## 510XX: Authorization Errors ### 51007: Token authentication is rejected by authentication service The authentication service has rejected the provided Access Token. To check whether the Access Token is structurally correct, you can use the tools available at https://jwt.io. For the details of Twilio's specific Access Token implementation including the grant format, check https://www.twilio.com/docs/iam/access-tokens. # 20XXX: Twilio Authorization Errors The following document defines all Twilio Authorization errors. [See here](table.md) for a table view. * [201XX: Authorization Errors](#201XX-authorization-errors) * [20101: Invalid access token](#20101-invalid-access-token) * [20102: Invalid access token header](#20102-invalid-access-token-header) * [20103: Invalid access token issuer/subject](#20103-invalid-access-token-issuer-subject) * [20104: Access token expired or expiration date invalid](#20104-access-token-expired-or-expiration-date-invalid) * [20105: Access token not yet valid](#20105-access-token-not-yet-valid) * [20106: Invalid access token grants](#20106-invalid-access-token-grants) * [20107: Invalid access token signature](#20107-invalid-access-token-signature) * [20151: Authentication Failed](#20151-authentication-failed) * [20157: Expiration Time Exceeds Maximum Time Allowed](#20157-expiration-time-exceeds-maximum-time-allowed) * [204XX: Forbidden Errors](#204XX-forbidden-errors) * [20403: 403 Forbidden](#20403-----forbidden) ## 201XX: Authorization Errors ### 20101: Invalid access token Twilio was unable to validate your Access Token ### 20102: Invalid access token header The header of the Access Token provided to the Twilio API was invalid ### 20103: Invalid access token issuer/subject The issuer or subject of the Access Token provided to the Twilio API was invalid ### 20104: Access token expired or expiration date invalid The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future ### 20105: Access token not yet valid The Access Token provided to the Twilio API is not yet valid ### 20106: Invalid access token grants The Access Token signature and issuer were valid, but the grants specified in the token were invalid, unparseable, or did not authorize the action being requested ### 20107: Invalid access token signature The signature for the Access Token provided was invalid. ### 20151: Authentication Failed The Authentication with the provided JWT failed ### 20157: Expiration Time Exceeds Maximum Time Allowed The expiration time provided when creating the JWT exceeds the maximum duration allowed ## 204XX: Forbidden Errors ### 20403: 403 Forbidden The account lacks permission to access the Twilio API. Typically this means the account has been suspended or closed. For assistance, please contact support # 31XXX: Voice Client & Server Errors The following document defines all Voice Client & Server errors. [See here](table.md) for a table view. * [312XX: SignatureValidation Errors](#312XX-signaturevalidation-errors) * [31202: Signature validation failed.](#31202-signature-validation-failed-) * [314XX: Client Errors](#314XX-client-errors) * [31400: Bad Request (HTTP/SIP)](#31400-bad-request--http-sip-) * [31403: Forbidden (HTTP/SIP)](#31403-forbidden--http-sip-) * [31404: Not Found (HTTP/SIP)](#31404-not-found--http-sip-) * [31408: Request Timeout (HTTP/SIP)](#31408-request-timeout--http-sip-) * [31409: Conflict (HTTP)](#31409-conflict--http-) * [31426: Upgrade Required (HTTP)](#31426-upgrade-required--http-) * [31429: Too Many Requests (HTTP)](#31429-too-many-requests--http-) * [31480: Temporarily Unavailable (SIP)](#31480-temporarily-unavailable--sip-) * [31481: Call/Transaction Does Not Exist (SIP)](#31481-call-transaction-does-not-exist--sip-) * [31484: Address Incomplete (SIP)](#31484-address-incomplete--sip-) * [31486: Busy Here (SIP)](#31486-busy-here--sip-) * [31487: Request Terminated (SIP)](#31487-request-terminated--sip-) * [315XX: Server Errors](#315XX-server-errors) * [31500: Internal Server Error (HTTP/SIP)](#31500-internal-server-error--http-sip-) * [31502: Bad Gateway (HTTP/SIP)](#31502-bad-gateway--http-sip-) * [31503: Service Unavailable (HTTP/SIP)](#31503-service-unavailable--http-sip-) * [31504: Gateway Timeout (HTTP/SIP)](#31504-gateway-timeout--http-sip-) * [31530: DNS Resolution Error (HTTP/SIP)](#31530-dns-resolution-error--http-sip-) * [316XX: SIP Server Errors](#316XX-sip-server-errors) * [31600: Busy Everywhere (SIP)](#31600-busy-everywhere--sip-) * [31603: Decline (SIP)](#31603-decline--sip-) * [31604: Does Not Exist Anywhere (SIP)](#31604-does-not-exist-anywhere--sip-) ## 312XX: SignatureValidation Errors ### 31202: Signature validation failed. The provided access token failed signature validation. #### Causes * The access token has an invalid Account SID, API Key, or API Key Secret. #### Solutions * Ensure the Account SID, API Key, and API Key Secret are valid when generating your access token. ## 314XX: Client Errors ### 31400: Bad Request (HTTP/SIP) The request could not be understood due to malformed syntax. ### 31403: Forbidden (HTTP/SIP) The server understood the request, but is refusing to fulfill it. ### 31404: Not Found (HTTP/SIP) The server has not found anything matching the request. #### Causes * The outbound call was made to an invalid phone number. * The TwiML application sid is missing a Voice URL. #### Solutions * Ensure the phone number dialed is valid. * Ensure the TwiML application is configured correctly with a Voice URL link. ### 31408: Request Timeout (HTTP/SIP) A request timeout occurred. ### 31409: Conflict (HTTP) The request could not be processed because of a conflict in the current state of the resource. Another request may be in progress. ### 31426: Upgrade Required (HTTP) This error is raised when an HTTP 426 response is received. The reason for this is most likely because of an incompatible TLS version. To mitigate this, you may need to upgrade the OS or download a more recent version of the SDK. ### 31429: Too Many Requests (HTTP) Too many requests were sent in a given amount of time. ### 31480: Temporarily Unavailable (SIP) The callee is currently unavailable. ### 31481: Call/Transaction Does Not Exist (SIP) The call no longer exists. ### 31484: Address Incomplete (SIP) The provided phone number is malformed. #### Causes * The outbound call was made with a phone number that has an invalid format. #### Solutions * Ensure the phone number dialed is formatted correctly. ### 31486: Busy Here (SIP) The callee is busy. ### 31487: Request Terminated (SIP) The request has terminated as a result of a bye or cancel. ## 315XX: Server Errors ### 31500: Internal Server Error (HTTP/SIP) The server could not fulfill the request due to some unexpected condition. ### 31502: Bad Gateway (HTTP/SIP) The server is acting as a gateway or proxy, and received an invalid response from a downstream server while attempting to fulfill the request. ### 31503: Service Unavailable (HTTP/SIP) The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. This error can also be caused by the Application SID provided in the access token pointing to an inaccessible URL. ### 31504: Gateway Timeout (HTTP/SIP) The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server. ### 31530: DNS Resolution Error (HTTP/SIP) Could not connect to the server. ## 316XX: SIP Server Errors ### 31600: Busy Everywhere (SIP) All possible destinations are busy. ### 31603: Decline (SIP) The callee does not wish to participate in the call. ### 31604: Does Not Exist Anywhere (SIP) The requested callee does not exist anywhere. # 21XXX: Twilio REST Errors The following document defines all Twilio REST errors. [See here](table.md) for a table view. * [212XX: TwiML Errors](#212XX-twiml-errors) * [21218: Invalid ApplicationSid](#21218-invalid-applicationsid) ## 212XX: TwiML Errors ### 21218: Invalid ApplicationSid You attempted to initiate an outbound phone call with an invalid ApplicationSid. The application may not exist anymore or may not be available within your account # 31XXX: Voice Errors The following document defines all Voice errors. [See here](table.md) for a table view. * [310XX: General Errors](#310XX-general-errors) * [31000: Unknown Error](#31000-unknown-error) * [31001: Application Not Found](#31001-application-not-found) * [31002: Connection Declined](#31002-connection-declined) * [31003: Connection Timeout](#31003-connection-timeout) * [31005: Connection error](#31005-connection-error) * [31008: Call cancelled](#31008-call-cancelled) * [31009: Transport error](#31009-transport-error) * [311XX: MalformedRequest Errors](#311XX-malformedrequest-errors) * [31100: The request had malformed syntax.](#31100-the-request-had-malformed-syntax-) * [31101: Missing parameter array in request](#31101-missing-parameter-array-in-request) * [31102: Authorization token missing in request.](#31102-authorization-token-missing-in-request-) * [31103: Maximum parameter length has been exceeded.](#31103-maximum-parameter-length-has-been-exceeded-) * [31104: Invalid bridge token](#31104-invalid-bridge-token) * [31105: Invalid client name](#31105-invalid-client-name) * [31107: The reconnect parameter is invalid](#31107-the-reconnect-parameter-is-invalid) * [312XX: Authorization Errors](#312XX-authorization-errors) * [31201: Authorization error](#31201-authorization-error) * [31203: No valid account](#31203-no-valid-account) * [31204: Invalid JWT token](#31204-invalid-jwt-token) * [31205: JWT token expired](#31205-jwt-token-expired) * [31206: Rate exceeded authorized limit.](#31206-rate-exceeded-authorized-limit-) * [31207: JWT token expiration too long](#31207-jwt-token-expiration-too-long) * [31209: Call Message Event Payload size exceeded authorized limit.](#31209-call-message-event-payload-size-exceeded-authorized-limit-) * [313XX: Registration Errors](#313XX-registration-errors) * [31301: Registration error](#31301-registration-error) * [31302: Unsupported Cancel Message Error](#31302-unsupported-cancel-message-error) * [314XX: UserMedia Errors](#314XX-usermedia-errors) * [31401: UserMedia Permission Denied Error](#31401-usermedia-permission-denied-error) * [31402: UserMedia Acquisition Failed Error](#31402-usermedia-acquisition-failed-error) ## 310XX: General Errors ### 31000: Unknown Error An unknown error has occurred. See error details for more information. ### 31001: Application Not Found ### 31002: Connection Declined ### 31003: Connection Timeout The server could not produce a response within a suitable amount of time. ### 31005: Connection error A connection error occurred during the call ### 31008: Call cancelled Unable to answer because the call has ended #### Causes * The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity. ### 31009: Transport error No transport available to send or receive messages ## 311XX: MalformedRequest Errors ### 31100: The request had malformed syntax. The request could not be understood due to malformed syntax. #### Causes * Invalid content or MessageType passed to sendMessage method. #### Solutions * Ensure content and MessageType passed to sendMessage method are valid. ### 31101: Missing parameter array in request ### 31102: Authorization token missing in request. ### 31103: Maximum parameter length has been exceeded. Length of parameters cannot exceed MAX_PARAM_LENGTH. ### 31104: Invalid bridge token ### 31105: Invalid client name Client name should not contain control, space, delims, or unwise characters. #### Causes * Client name contains invalid characters. #### Solutions * Make sure that client name does not contain any of the invalid characters. ### 31107: The reconnect parameter is invalid ## 312XX: Authorization Errors ### 31201: Authorization error The request requires user authentication. The server understood the request, but is refusing to fulfill it. ### 31203: No valid account ### 31204: Invalid JWT token ### 31205: JWT token expired ### 31206: Rate exceeded authorized limit. The request performed exceeds the authorized limit. #### Causes * Rate limit exceeded. #### Solutions * Ensure message send rate does not exceed authorized limits. ### 31207: JWT token expiration too long ### 31209: Call Message Event Payload size exceeded authorized limit. The request performed to send a Call Message Event exceeds the payload size authorized limit #### Causes * The payload size of Call Message Event exceeds the authorized limit. #### Solutions * Reduce payload size of Call Message Event to be within the authorized limit and try again. ## 313XX: Registration Errors ### 31301: Registration error ### 31302: Unsupported Cancel Message Error This version of the SDK no longer supports processing cancel push notification messages. You must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS with this version of the SDK to stop receiving cancel push notification messages. Cancellations are now handled internally and reported to you on behalf of the SDK. #### Causes * The identity associated with the Twilio Voice SDK is still registered to receive cancel push notification messages. #### Solutions * The application must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS to stop receiving cancel push notification messages. ## 314XX: UserMedia Errors ### 31401: UserMedia Permission Denied Error The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio. #### Causes * The user denied the getUserMedia request. * The browser denied the getUserMedia request. #### Solutions * The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser. * The user should to verify that the browser has permission to access the microphone at this address. ### 31402: UserMedia Acquisition Failed Error The browser and end-user allowed permissions, however getting the media failed. Usually this is due to bad constraints, but can sometimes fail due to browser, OS or hardware issues. #### Causes * NotFoundError - The deviceID specified was not found. * The getUserMedia constraints were overconstrained and no devices matched. #### Solutions * Ensure the deviceID being specified exists. * Try acquiring media with fewer constraints. # 53XXX: Voice WebRTC Errors The following document defines all Voice WebRTC errors. [See here](table.md) for a table view. * [530XX: Signaling Errors](#530XX-signaling-errors) * [53000: Signaling connection error](#53000-signaling-connection-error) * [53001: Signaling connection disconnected](#53001-signaling-connection-disconnected) * [534XX: Media Errors](#534XX-media-errors) * [53400: Client is unable to create or apply a local media description](#53400-client-is-unable-to-create-or-apply-a-local-media-description) * [53401: Server is unable to create or apply a local media description](#53401-server-is-unable-to-create-or-apply-a-local-media-description) * [53402: Client is unable to apply a remote media description](#53402-client-is-unable-to-apply-a-remote-media-description) * [53403: Server is unable to apply a remote media description](#53403-server-is-unable-to-apply-a-remote-media-description) * [53404: No supported codec](#53404-no-supported-codec) * [53405: Media connection failed](#53405-media-connection-failed) * [53407: The media connection failed due to DTLS handshake failure](#53407-the-media-connection-failed-due-to-dtls-handshake-failure) ## 530XX: Signaling Errors ### 53000: Signaling connection error Raised whenever a signaling connection error occurs that is not covered by a more specific error code. ### 53001: Signaling connection disconnected Raised whenever the signaling connection is unexpectedly disconnected. #### Causes * The device running your application lost its Internet connection. #### Solutions * Ensure the device running your application has access to a stable Internet connection. ## 534XX: Media Errors ### 53400: Client is unable to create or apply a local media description Raised whenever a Client is unable to create or apply a local media description. #### Causes * The Client may not be using a supported WebRTC implementation. * The Client may not have the necessary resources to create or apply a new media description. #### Solutions * If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation. ### 53401: Server is unable to create or apply a local media description Raised whenever the Server is unable to create or apply a local media description. #### Causes * A server-side error has occurred. #### Solutions * If the problem persists, try connecting to another region. ### 53402: Client is unable to apply a remote media description Raised whenever the Client receives a remote media description but is unable to apply it. #### Causes * The Client may not be using a supported WebRTC implementation. * The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation. * The Client may not have the necessary resources to apply a new media description. #### Solutions * If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation. ### 53403: Server is unable to apply a remote media description Raised whenever the Server receives a remote media description but is unable to apply it. #### Causes * The Client may not be using a supported WebRTC implementation. * The Client may not have the necessary resources to apply a new media description. * A Server-side error may have caused the Server to generate an invalid media description. #### Solutions * If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation. * If the problem persists, try connecting to another region. ### 53404: No supported codec Raised whenever the intersection of codecs supported by the Client and the Server (or, in peer-to-peer, the Client and another Participant) is empty. #### Causes * The C++ SDK was built without the recommended set of codecs. * The JavaScript SDK is running in a browser that does not implement the recommended set of codecs. #### Solutions * If you are experiencing this error using the C++ SDK, ensure you build it with the recommended set of codecs. * If you are experiencing this error using the JavaScript SDK, ensure you are using a compatible browser. ### 53405: Media connection failed Raised by the Client or Server whenever a media connection fails. #### Causes * The Client was unable to establish a media connection. * A media connection which was active failed liveliness checks. #### Solutions * If the problem persists, try connecting to another region. * Check your Client's network connectivity. * If you've provided custom ICE Servers then ensure that the URLs and credentials are valid. ### 53407: The media connection failed due to DTLS handshake failure There was a problem while negotiating with the remote DTLS peer. Therefore the Client will not be able to establish the media connection. #### Causes * One or both of the DTLS peers have an invalid certificate. * One or both of the DTLS peers have an outdated version of DTLS. * One or both of the DTLS peers lost internet connectivity while performing a DTLS handshake. #### Solutions * Ensure that your certificate is valid. * Ensure that you have a stable internet connection. * Ensure that the browser or the Mobile SDK supports newer versions of DTLS.