Does getProfile method only allow "did" string?

Expert

Does getProfile method only allow "did" string? I'm trying to find user(s) using their username, the same way it works here when you type "@" to mention someone.