Obtaining an API Key and Pool
To interact with the API you will need to first get an API key and a pool reference.
The pool indicates the target Wherewolf app for your requests.
Get the API key and pool for your user by using the /user/login endpoint.
curl -X POST \
https://api.wherewolf.co.nz/user/login \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"user": "your_user_email_address",
"pass": "your_password"
}'
The response will then contain details about your user and the Wherewolf app(s) linked to it.
Inside the returned object, you will find the properties key and pool.
{
...
"key": "___API___KEY___HERE___",
"pool": "___POOL___HERE___",
...
}
Multiple Apps?
If your user is granted with access to multiple apps, you will find a list of these inside poolsAvailableComplete.
{
...
"key": "___API___KEY___HERE___",
"pool": "___DEFAULT___POOL___HERE___",
...
"poolsAvailableComplete": [
{
"pool": "ABC123",
"poolName": "One App"
},
{
"pool": "ABC123",
"poolName": "Another App"
}
...
}
Note: All API interactions are performed against one Wherewolf App (defined within the request). This means that if (as an example) you are trying to get a list of guests from multiple Apps, you will be required to perform multiple calls. Also have in mind that it is not common to have users with access granted to multiple Wherewolf Apps, this is reserved to a few special cases.
Getting an API using the Dashboard
You can also get an API key and pool by logging into the Wherewolf Dashboard, for more information see here