GET /api/v1/user
Fetch info on the currently authenticated user
Request
$ curl -X GET https://api.payhere.co/api/v1/user -H "Authorization: Bearer ${api_key_here}"
require "http"
require "json"
raw_json = HTTP.auth("Bearer #{api_key_here}")
.get("https://api.payhere.co/api/v1/user")
.body.to_s
json = JSON.parse(raw_json)
Response
{
"data": {
"id": 2,
"display_name": "John Smith",
"email": "john.smith@example.org",
"created_at": "2015-11-08T14:12:27.962Z",
"updated_at": "2019-03-04T13:57:32.114Z",
"type": "users"
}
}
Errors
- 401 Unauthorized