Token

Retrieve current token

Returns info about the current OAuth access token. If the token is a user token the response will include a User object.

Endpoint

Method URL Token
GET https://api.app.net/token Any

Example (App Token)

to see more complete examples.

curl -H "Authorization: Bearer <YOUR APP TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/token"
{
  "data": {
    "app": {
      "client_id": "LHYCvdgDuUXndfCfyqABAtezCJjjsVM2",
      "link": "http://foo.example.com",
      "name": "Test app"
    },
    "scopes": [
      "stream",
      "messages",
      "export",
      "write_post",
      "follow"
    ],
    "limits": {
      "following": 40,
      "max_file_size": 10000000
    },
    "storage": {
      "available": 8787479688,
      "used": 1212520312
    },
    "user": "...user object...",
    "invite_link": "https://join.app.net/from/notareallink"
  },
  "meta": {
    "code": 200
  }
}

Example (User Token)

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/token"
{
  "data": {
    "app": {
      "client_id": "LHYCvdgDuUXndfCfyqABAtezCJjjsVM2",
      "link": "http://foo.example.com",
      "name": "Test app"
    },
    "scopes": [
      "stream",
      "messages",
      "export",
      "write_post",
      "follow"
    ],
    "limits": {
      "following": 40,
      "max_file_size": 10000000
    },
    "storage": {
      "available": 8787479688,
      "used": 1212520312
    },
    "user": "...user object...",
    "invite_link": "https://join.app.net/from/notareallink"
  },
  "meta": {
    "code": 200
  }
}

Deauthorize current token

Deauthorize the current OAuth access token. This works for User tokens and App tokens.

Endpoint

Method URL Token
DELETE https://api.app.net/token Any

Example

Requested with a user access token:

to see more complete examples.

curl -X DELETE -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/token"
{
  "data": {
    "app": {
      "client_id": "LHYCvdgDuUXndfCfyqABAtezCJjjsVM2",
      "link": "http://foo.example.com",
      "name": "Test app"
    },
    "scopes": [
      "stream",
      "messages",
      "export",
      "write_post",
      "follow"
    ],
    "limits": {
      "following": 40,
      "max_file_size": 10000000
    },
    "storage": {
      "available": 8787479688,
      "used": 1212520312
    },
    "user": "...user object...",
    "invite_link": "https://join.app.net/from/notareallink"
  },
  "meta": {
    "code": 200
  }
}

Retrieve authorized User IDs for an app

Returns a list of ids of Users that have authorized an app. Must be requested using an app access token.

Endpoint

Method URL Token
GET https://api.app.net/apps/me/tokens/user_ids App

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR APP TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/apps/me/tokens/user_ids"
{
  "data": [
    "2",
    "3"
  ],
  "meta": {
    "code": 200
  }
}

Retrieve authorized User tokens for an app

Returns a list of User tokens corresponding to an app token. Must be requested using an app access token.

Responses from this endpoint are paginated.

Endpoint

Method URL Token
GET https://api.app.net/apps/me/tokens App

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR APP TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/apps/me/tokens"
{
  "data": [
    {
      "app": {
        "client_id": "LHYCvdgDuUXndfCfyqABAtezCJjjsVM2",
        "link": "http://foo.example.com",
        "name": "Test app"
      },
      "scopes": [
        "stream",
        "messages",
        "export",
        "write_post",
        "follow"
      ],
      "limits": {
        "following": 40,
        "max_file_size": 10000000
      },
      "storage": {
        "available": 8787479688,
        "used": 1212520312
      },
      "user": "...user object...",
      "invite_link": "https://join.app.net/from/notareallink",
      "pagination_id": "10723"
    }
  ],
  "meta": {
    "code": 200,
    "more": false,
    "min_id": "10723",
    "max_id": "10723"
  }
}