PetHub uses OAuth for secure authentication.
To get started you need to:
- Submit an API Key Request form
- Create a PetHub.io account (invitation only - details provided when API key is assigned)
- Send requests to our servers with proper authentication (e.g. you can use cURL for testing)
Once you have your API Key and Secret, combined those can be used to request an access token. It is this token that is passed with each API request sent to our servers.
To get an access token, simply make the following request (replacing {API-KEY} and {API-SECRET} with the information associated with your account):
curl -d "request_type=api_credentials&api_key={API-KEY}&api_secret={API-SECRET}" https://pethub.io/v1/oauth2/token
The PetHub.io server will send back a response similar to the following:
{ "token_type": "Bearer", "expires_in": 1800, "access_token": "some-alphanumeric-token" }