Get client credentials
Every third-party application identifies itself to the SplashMe API with a client. Each client belongs to one SplashMe account and is issued by SplashMe on request. Once you have one, your application can authenticate in either of two ways.
1. Request your credentials
Section titled “1. Request your credentials”Client credentials are issued by SplashMe. Email support@splashmepool.com.au with:
- the name of your application or integration,
- the SplashMe account it belongs to (the requests it makes are limited to that account’s sites and controllers),
- whether users will sign in through the OAuth2 flow, and if so the redirect URIs to register (see the rules below),
- whether you also need the password grant, which is enabled per client.
You receive a client_id and a client_secret. Every client can use the authentication and user and site endpoints; device endpoints are enabled per client, see What is available today. Store both in your server-side configuration; the secret must never ship inside a mobile or browser application. To rotate a secret, or to change the redirect URIs, contact support@splashmepool.com.au again.
2. Choose how your application authenticates
Section titled “2. Choose how your application authenticates”Every API request is authenticated in one of two ways. Both give the same access; pick by who the request acts for.
Bearer token: acting for a signed-in user
Section titled “Bearer token: acting for a signed-in user”Obtain a token for the user, either through the OAuth2 flow (the user signs in on the SplashMe page and grants your application access) or, for your own account, through the direct sign-in. Send it on every request:
Authorization: Bearer <token>The request then acts for that user and sees that user’s sites and controllers. See Using tokens.
Client signature: acting for the account that owns the client
Section titled “Client signature: acting for the account that owns the client”No sign-in and no token. Sign every request with your client_secret and send four headers; the request acts for the SplashMe account that created the client.
| Header | Value |
|---|---|
X-Client-Id |
Your client_id |
X-Timestamp |
Current Unix time in seconds |
X-Nonce |
A random string, different for every request |
X-Signature |
The signature below, lower-case hex |
signature = hex(HMAC-SHA256( client_secret, METHOD + "\n" + RequestURI + "\n" + client_id + "\n" + timestamp + "\n" + nonce))METHODis upper case, for exampleGETorPOST.RequestURIis the path plus query string, for example/api-gateway/v1/iot-shadow/device/AA_0000/pumpInfo?x=1. The scheme, host and request body are not part of the signature.timestampmust be within 5 minutes of the server clock and eachnoncecan be used once.
When all four headers are present the request is authenticated by signature and any Authorization header is ignored. Code samples, the server-side checks and the error table are on Client signature.
Redirect URI rules
Section titled “Redirect URI rules”- Each URI must be absolute, with a scheme and a host.
http://localhost:3000/cbis accepted for development. - At authorization time the
redirect_uriyou send must match one of the registered values exactly, character for character. There is no prefix or wildcard matching. - Blank entries are dropped and duplicates are removed. At least one URI is required.

