To use the api you must first register your app.
A developer site is available to test with api site https://api.developer.townsuite.com/. Please register and experiment here before registering on a live site (https://[YourTownName].ws.townsuite.com/).
Login -> Your account -> Your Apps & Credentials
From here register as a developer, create a new app. Once done you will be given a client_id, client_secret, and town_code.
The client_id is mandatory to use from your app when authorizing and refreshing tokens.