Retrieve the user key (usually the email) for the currently logged-in user
GET
/whoami
const url = 'https://raw.githubusercontent.com/whoami';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://raw.githubusercontent.com/whoamiRetrieve the user key (usually the email) for the currently logged-in user
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”User info
Media type application/json
Information about a user
object
key
The user key associated with this user. Usually an email
string
Example generated
{ "key": "example"}Unspecified server error encountered
Media type application/json
object
query
required
Error object container
object
error
required
Name/type of the error that occurred
string
message
required
Message explaining why the error occurred
string
Example
{ "query": { "error": "ServerError", "message": "An unspecified server error occurred" }}