Skip to content

Personal Access Tokens

Use a Personal Access Token to get data from your own account without building an OAuth 2.0 flow or exposing your API client to other Appfigures users.

A Personal Access Token is an OAuth 2.0 token you issue yourself. After you generate it, you send it with your requests the same way you’d send an OAuth 2.0 Bearer token.

You can’t use this token in OAuth 1.0a requests. It only works as the bearer in OAuth 2.0 requests.

Each Personal Access Token belongs to an API Client, so you’ll need to create one on the My API Keys page first.

  1. Open the details of any key in your account.
  2. Click Create Personal Access Token.
  3. Save the token somewhere safe.

The token lets you make API requests on behalf of you and the API Client. Treat it like a password. You won’t be able to see it again after it’s issued.

If your token is pat_1234, pass it in the Authorization header the same way you’d pass an OAuth 2.0 Bearer token.

>> Request
GET https://api.appfigures.com/v2/
Authorization: Bearer pat_1234
<< Response
200 OK
{
"status": "200",
"message": "OK",
"see": "https://docs.appfigures.com/api",
"version": "2.0",
"user": {
"id": 42,
"name": "Test User",
"email": "test@test.com",
"avatar_url": "https://secure.gravatar.com/avatar/dbe9de53f77958ee4ff7e19697a58990?d=mm"
},
. . . snip . . .
}
import requests
token = "pat_1234mytoken"
headers = {
"user-agent": "myclient/1.0",
"authorization": f"Bearer {token}"
}
resp = requests.get("https://api.appfigures.com/v2/", headers=headers)