Me #
The Me endpoint returns the details of the authenticated user making the request.
Request #
curl --location --request GET 'https://api.microbooks.io/auth/v1/me' \
--header "Authorization: Bearer <bearer_token>"
import requests
url = "https://api.microbooks.io/auth/v1/me"
body = {}
headers = {"Authorization": "Bearer <bearer_token>"}
response = requests.request("GET", url, headers=headers, json=body)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.microbooks.io/auth/v1/me',
'headers': {'Authorization': 'Bearer <bearer_token>'},
'body': '{}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$client = new Client();
$body = '';
$request = new Request('GET', 'https://api.microbooks.io/auth/v1/me',
[headers' => ['Authorization' => 'Bearer <bearer_token>']],
$body
);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
var client = new RestClient("https://api.microbooks.io/auth/v1/me");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
var body = "{}";
request.AddParameter("text/plain", body, ParameterType.RequestBody);
request.AddHeader("Authorization", "Bearer " + <bearer_token>);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Response #
{
"id": 1,
"name": "John Doe",
"email": "john.doe@example.com"
}