What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

ACL WHOAMI

Returns the authenticated username of the current connection.

Usage
ACL WHOAMI
Complexity
O(1)
Since
6.0.0
ACL Categories
@slow
Command flags
NOSCRIPT, LOADING, STALE, SENTINEL

Return the username the current connection is authenticated with. New connections are authenticated with the "default" user. They can change user using AUTH.

Examples

127.0.0.1:6379> ACL WHOAMI
"default"

Replies

RESP2

Bulk string reply: the username of the current connection.

RESP3

Bulk string reply: the username of the current connection.