yiisoft/yii2 · error · UnauthorizedHttpException
Your request was made with invalid credentials.
Error message
Your request was made with invalid credentials.
What it means
Error "Your request was made with invalid credentials." thrown in yiisoft/yii2.
Source
Thrown at framework/filters/auth/AuthMethod.php:98
$this->challenge($response);
$this->handleFailure($response);
return false;
}
/**
* {@inheritdoc}
*/
public function challenge($response)
{
}
/**
* {@inheritdoc}
*/
public function handleFailure($response)
{
throw new UnauthorizedHttpException('Your request was made with invalid credentials.');
}
/**
* Checks, whether authentication is optional for the given action.
*
* @param Action $action action to be checked.
* @return bool whether authentication is optional or not.
* @see optional
* @since 2.0.7
*/
protected function isOptional($action)
{
$id = $this->getActionId($action);
foreach ($this->optional as $pattern) {
if (StringHelper::matchWildcard($pattern, $id)) {
return true;
}
}View on GitHub (pinned to 66f00d18a2)
When it happens
Trigger: Thrown at framework/filters/auth/AuthMethod.php:98 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of yiisoft/yii2@66f00d18a2 (2026-08-17).
Data as JSON: /api/errors/663554cde4b658ce.
Report an issue: GitHub.