Me API


GET /api/v1/me

Get the current user

GET /api/v1/me

Example CURL command

curl "https://secure.aha.io/api/v1/me" -X GET \
	-H "Content-Type: application/json" \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1"

Request

Content-Type: application/json
Accept: application/json
Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "user": {
    "id": "1020675218",
    "name": "Mary Humpty",
    "email": "mary.humpty@account1.com",
    "created_at": "2017-05-31T20:12:51.000Z",
    "updated_at": "2017-05-31T20:12:51.000Z",
    "accessed_at": null,
    "product_roles": [
      {
        "role": 20,
        "product_id": "131414752"
      },
      {
        "role": 20,
        "product_id": "517761884"
      },
      {
        "role": 20,
        "product_id": "610602692"
      }
    ],
    "accounts": [
      {
        "account": {
          "name": "Account 1",
          "domain": "account1"
        }
      }
    ]
  }
}

GET /api/v1/me

Return error if user is not authenticated

GET /api/v1/me

Example CURL command

curl "https://secure.aha.io/api/v1/me" -X GET \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Content-Type: application/json
Accept: application/json

Response

Status: 401 Unauthorized
  Content-Type: text/html

Overview

API Resources