GET /api/v2/users/account_info/:account_key

This method allows to get the account information associated to an API key.

Supported Formats

Request : */*, Response : application/json

Errors

Code Description
401 This request is unauthorized. Either your key is invalid or wasn't specified.
403 This request is forbidden. Your account may have been blocked.
429 The amount of requests per minute has been exceeded. All accounts (even the unlimited ones) are rate limited to 250 requests per minute unless agreed otherwise with Inverse.
502 No API backend was able to process the request. The system may be overloaded, in maintenance or experiencing an issue. Retrying shortly after should work.
404 No user was found for the provided API key

Examples

  Example using curl (where 9e1808205b91362f9e3543aa4cea406e4aeedc69 is the API key of the user):
  curl https://api.fingerbank.org/api/v2/users/account_info/9e1808205b91362f9e3543aa4cea406e4aeedc69
{
  "id": 0,
  "name": "bob",
  "display_name": "John Doe",
  "level": 0,
  "created_at": "2014-09-09T15:10:22.000Z",
  "updated_at": "2020-06-29T15:21:13.000Z",
  "key": "9e1808205b91362f9e3543aa4cea406e4aeedc69",
  "email": "jdoe@example.com",
  "blocked": false,
  "search_count": 3764,
  "timeframed_search_count": 0,
  "monthly_limit": 1000000,
  "auth_type": "github",
  "roles": "GENERAL",
  "expiration": null,
  "timeframed_requests": 3,
  "monthly_requests": 126,
  "requests": 1512
}
  

Params

Param name Description
key
required

Your API key (you can optionally use the Authorization header for improved security)

Validations:

  • Must be a String


Metadata:
Type: query parameter
Example: "?key=68989f507420b6187c7e4fa32245db311efed505"
account_key
optional

The device ID to get information from

Validations:

  • Must be a Integer


Metadata:
Type: URL

Returns

Code: 200

Description:

User entry

Param name Description
id
required

The numeric user ID

Validations:

  • Must be a Integer

name
required

The unique username

Validations:

  • Must be a String

level
required

The level of the user. (0:community, 5:api_submitter, 7:monthly_limited, 9:unlimited, 10:admin)

Validations:

  • Must be a Integer

created_at
required

The date the user was created

Validations:

  • Must be a Date

updated_at
required

The date the user was last updated

Validations:

  • Must be a Date

email
required

The email address of the user

Validations:

  • Must be a String

blocked
required

Value will be true when the user is blocked from using the API

Validations:

  • Must be one of: true, false.

search_count
required

The amount of searches the user did in the admin console

Validations:

  • Must be a Integer

timeframed_search_count
required

The amount of searches the user did in the admin console today

Validations:

  • Must be a Integer

monthly_limit
required

The maxiumum amount of requests per month the user can do (soft limit)

Validations:

  • Must be a Integer

auth_type
required

The authentication mechanism used to register

Validations:

  • Must be a String

roles
required

Comma delimited list of the roles the user has

Validations:

  • Must be a String

expiration
required

The date on which the access of the user expires (only applies to monthly_limited users). null means that the access never expires

Validations:

  • Must be a Date

timeframed_requests
required

The amount of requests the user has performed during the current hour

Validations:

  • Must be a Integer

monthly_requests
required

The amount of requests the user has performed during the current month

Validations:

  • Must be a Integer

requests
required

The amount of total requests the user had performed

Validations:

  • Must be a Integer

Headers

Header name Description
Authorization
optional
Authorization header containing your API key (Bearer standard). Example value for the header: `Bearer 68989f507420b6187c7e4fa32245db311efed505`