PetRescue API Authentication
PetRescue uses token based authentication for all of the API requests.
To authenticate your request you must provide the your token as a parameter in the request, alternatively the token can be provided in an authentication header.
Example Request with parameter
GET |
https://www.petrescue.com.au/api/listings?token=your_api_token
|
---|
Example Request with header
HEADER |
Authorization: Token token=your_api_token
|
---|---|
GET |
https://www.petrescue.com.au/api/listings
|
Error Response
An erroneous request to this resource will return a 401 Unauthorized. The response body will contain a JSON object with details of the error.
The error object will contain:
Key | Description |
error_code | A string describing the error. |
---|---|
errors | A JSON object containing all of the errors in from request. |
If no token is provided in the request the response body will contain:
|
If an invalid token is provided in the request the response body will contain:
|