All information in this document assumes the
response_envelopemigration is active. Please refer to Migrations for more information.
All responses to requests to the App.net API endpoints described in Resources, whether successful or not, will be returned in the same type of envelope structure. This document will describe how that envelope works as well as how it can be used for convenient purposes, such as pagination.
The top-level response is an object containing two keys. The first key,
data, corresponds to the actual response item requested. This may either be an object itself or a list of objects. The particular data returned is described in each endpoint's documentation. If the request is unsuccessful (results in an error), no
data key will be present.
The second key present,
meta, corresponds to an object containing additional information about the request. This object will always contain
code, a copy of the HTTP status code that has been returned. It will also contain pagination data, when relevant.
script tag. It is not possible to make requests to API endpoints which require authentication with JSONP.
To use JSONP, add a
callback parameter to the request's query string. For example:
Will result in a response that looks something like this:
When using JSONP, our servers will return a 200 status code in the HTTP response, regardless of the effective status code.
For more information on JSONP, see the Wikipedia page for JSONP.
We support CORS for authenticated cross-domain API requests direct from browsers. Support for CORS may vary by browser. When using CORS, you are still responsible for obtaining, storing and supplying a valid access token with each request, if access to authenticated endpoints is required. For more information on CORS, see the Wikipedia page for CORS.
If the request was unsuccessful for some reason, no
data key will be returned -- the response object will only contain a
meta object. Additional information pertaining to the type of error generated will be returned inside the
meta object. In particular, the
error_message keys will point out what sort of error occurred. There may also be a uniquely-identifying
error_id present that can be used to get more information about the error and which may be helpful in support requests with App.net staff.
||global||The passed OAuth token was not valid. It may have been corrupted or missing some of its data|
||global||The User for the given token has likely explicitly revoked access to your App. You may wish to reauthenticate that User.|
||global||The passed token (or code) has reached the end of its lifetime. A new token will have to be generated.|
||access_token||The passed OAuth
||access_token||The call to access_token must include
||string||The greatest ID returned in the data set. Inclusive. This should be considered an opaque identifier that may be passed as
||string||The least ID returned in the data set. Inclusive. This should be considered an opaque identifier that may be passed as |