cURL
curl --request GET \ --url https://api.example.com/api/user \ --header 'Authorization: <authorization>' \ --header 'x-api-key: <x-api-key>'
{ "success": true, "message": "Success fetching user data", "data": { "id": 1, "name": "John Doe", "email": "[email protected]", "profile_photo": "uploads/profile-photo/1234567890-123456789.jpg", "created_at": "2024-01-15T10:30:00.000Z", "updated_at": "2024-02-20T14:45:00.000Z" } }
Bearer <token>
Show data properties
curl --request GET \ --url https://api.example.com/api/user \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'x-api-key: your_api_key_here'
{ "error": "Access Denied" }