---
updatedAt: 2025-11-12T21:33:42.000Z
agentTools:
  projectIndex: https://sg-docs.gogox.com/llms.txt
---

# Get an access token

Get a short-lived access token

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "GOGOX Public API v2 (SG STAG)",
    "version": "0.1.0",
    "description": "# Introduction\nThis is v2 of GOGOX public APIs. GOGOX platform is where you can ease your logistics needs through our huge network of delivery partners. You can reduce your logistics operation and leverage the capabilities of GOGOX Platform through our APIs. You can contact our sales [on our website]() and start trying.\n# Authentication  \nYour security is our number 1 priority. You can follow [OAuth 2.0 client credential flow](https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/). In short, once you have registered, you should receive a **client ID** and a **client secret**. Once you have those, you can get an **access token** from `POST /oauth/token` with **client ID** and **client secret**. You can access the remaining APIs using the access token. The access token will expire according to the API responses. If it is expired, simply call `POST /oauth/token` again to refresh the token.\n# Versioning\nThe stablility of our APIs is also one of our top priority. You can integrate with our APIs and put in minimal maintenence cost to keep it working. Each developer account will have the latest version of our APIs as your API version. We won't change it without your consent. \nIn case you want to upgrade to a certain version to enjoy the latest enhancement, please access developer portals to change it. You will receive our changes in each releases in your registered email. You can also temporarily override and try out other version of API with specifying `Api-Version` key in the HTTP header in each API call.\n# Callback\nOnce you have placed the orders, it is very important for you to be able to receive updates of your placed orders from our platform. We are using webhook to notify your software the updates of your placed orders. You can set up your callback URLs in the developer portal.\nAs always a stable API is very important for your business, so in case we cannot send you the webhook notification, we are doing an exponential backoff up to 10 times.\nYou can also poll the `GET /api/v2/orders/{uuid}` to get the latest status of the order request. \n# Time\nWe are using utc timestamp.\n# OAuth Scope\nWe currently open all privileges for API access. The scope is always your dataset.\n# Release Notes\n2020-04-01: [0.1.0]()"
  },
  "servers": [
    {
      "url": "https://{server}",
      "description": "Our Sandbox Server for different regions",
      "variables": {
        "server": {
          "default": "stag-sg-api.gogox.com"
        }
      }
    }
  ],
  "paths": {
    "/oauth/token": {
      "post": {
        "summary": "Get an access token",
        "description": "Get a short-lived access token",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials"
                    ]
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Valid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string",
                      "enum": [
                        "Bearer"
                      ]
                    },
                    "expires_in": {
                      "type": "integer"
                    },
                    "created_at": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Generic error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "invalid_client",
                        "invalid_parameters"
                      ]
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Internal Server Error: Please retry and if situation persist, contact dev.platform@gogotech.hk"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```