Skip to main content

API keys API

Get latest

Use your existing secret key to get a new secret key.

The response contains the secret key you should use from now on. Usually this is your existing key. When your existing key is about to expire, this is your new secret key.

You should do this once per day.

To test your automatic secret key renewal code:

  1. Create two secret API keys using QuickStream Portal.
  2. Configure your application to use the first key.
  3. Confirm that your application automatically switches to the second key.


GET /api-keys/latest

Use your Secret API key to access this resource.

Request body



If successful, this method returns the following in the response body.

Field Format Data
keyName string The API key name. Use for logging.
key string The secret API key.
expiryDate date-time The date and time the key will expire.

API Key response example

  "keyName": "FACILITYCODE_SEC...zrikj5x",
  "key": "FACILITYCODE_SEC_dcm89ugjh5jbcjq5pdymhgimdj7gwwd7dddhty6arjrjftv8hymz8zr",
  "expiryDate": "2022-01-02T03:48:40+00:00"
HTTP status codes

See HTTP Status Codes for more.

Status Code Description More information
200 OK The request has succeeded.
401 UNAUTHORIZED The secret API key in the request is expired, or you have used your Publishable API key instead of your Secret API key. View more.

The information contained in this publication is provided for learning purposes only and is subject to change. Revisions may be issued from time to time that encompass changes or additions to this module.

This is a guide only and it is not comprehensive. It does not impinge on or overrule any formal arrangement you may enter into with the Bank. The Bank and its officers shall not have any liability for any losses of any kind incurred in connection with any action, inaction or decision taken in reliance on the information herein or for any inaccuracies, errors or omissions. In this publication references to the "Bank" are to Westpac Banking Corporation ABN 33 007 457 141 and to any of its operating Divisions, including BankSA and St.George.