25018: The request is not authorized
ERROR
Twilio returned this error because the request could not be authenticated or did not have permission to access the requested resource. This usually means the request included invalid credentials, used the wrong authentication method, or attempted an operation that the authenticated user is not allowed to perform.
- The request used an incorrect Account SID or Auth Token.
- The request used an invalid API Key SID or API Key Secret.
- The request included credentials for a different Twilio account or subaccount than the target resource.
- The request used a deleted, revoked, or inactive API Key.
- The request sent a malformed or missing
Authorizationheader. - The request used a restricted key or user that does not have permission to perform the operation.
- The request attempted to access a resource owned by another account.
- Verify that you are sending the correct credentials for the account or subaccount that owns the resource.
- If you use basic authentication, confirm that the Account SID and Auth Token are valid and active.
- If you use API Keys, confirm that the API Key SID and API Key Secret are correct and that the key has not been revoked.
- Make sure the
Authorizationheader is present and properly encoded for the authentication method you are using. - Confirm that your request is targeting the correct Account SID and resource path.
- If you use subaccounts, authenticate with credentials that belong to the same subaccount as the resource you want to access.
- Review your API Key, account user, or role configuration to make sure it has permission to perform the requested action.
- Regenerate credentials if you suspect they were copied incorrectly or have been rotated.