User details
Endpoint GET /user
Retrieve the user's basic information, including email and name.
Example Request:
- curl
- Node.js
curl -H "Authorization: Bearer ACCESS_TOKEN" "https://api.commoninja.com/platform/api/v1/user"
const axios = require('axios');
async function getData() {
const response = await axios.get('https://api.commoninja.com/platform/api/v1/user', {
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
}
});
return response.data;
}
getData();
Example Response:
{
"id": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"email": "[email protected]",
"name": "Jake Sully"
}