Why does a browser session get 401 on GET /v1/credential?
That operation describes a bearer credential, and a session has none. A
session calling it gets 401 UNAUTHENTICATED. Use GET /v1/me in a
session.
More: The REST API, Edge cases