Skip to content

Get an API Key ​

This page explains how to create, rotate, and revoke API Keys yourself in the client OMS, and how to view the call log.

Where to Find It ​

OMS (https://oms.vmwms.com) → System (系统) → Open API (开放API对接)

Only the main account can manage API Keys

Sub-accounts that open this page see the message "Sub-accounts cannot create or manage API keys. Please sign in with the main account." An API Key acts as the main account, can only access your own data, and has the same permissions as your portal login.

Create an API Key ​

  1. On the "API keys" card, click Create API key.

  2. Fill in the form:

    FieldDescription
    NameRequired. Used to tell integrations apart (for example, "ERP production" or "Lingxing")
    Read-onlyIf checked, the Key can only call query endpoints
    Requests / minuteNumber of calls allowed per minute. Leave blank for the default of 600; maximum 6000
    ExpiresLeave blank for no expiry; if set, it must be later than the current time
    RemarkOptional
  3. Click Save. The "Save it now (shown only once)" dialog appears, showing the Key and Secret.

  4. Click Copy to store them somewhere safe, then click I have saved it.

The Secret is shown only once

The Secret is shown only once, when the Key is created or rotated. You cannot view it again after closing the dialog, and the platform cannot recover it. If you lose it, the only option is to Rotate the Key to generate a new Secret.

  • A Key looks like vmk_live_ followed by 24 hexadecimal characters; a Secret is 43 characters long.
  • Each account can hold up to 20 active Keys at the same time. We recommend creating a separate Key for each integrated system, which makes troubleshooting and individual revocation easier.

API Key List Columns ​

ColumnDescription
NameThe name entered at creation
KeyThe public Key; for the Secret only "Last 4" characters are shown
Read-only"Read-only" or "Read/write"
Requests / minuteThe number of calls this Key may make per minute
Status"Active" or "Inactive" (revoked / expired)
ExpiresShows "Never" if not set
Last usedTime of the most recent call; shows "Never used" if it has never been used
CreatedCreation time

Rotate a Secret ​

Use this when a Secret may have leaked, or when you need to change it periodically.

  1. Click Rotate on the row of the Key.
  2. In the "Rotate secret" dialog, set "Old secret grace period (hours)": the default is 24 hours, and you can set 0 to 72. Set 0 to disable the old Secret immediately.
  3. Click Rotate and save the new Secret.
  4. During the grace period both the old and new Secrets work. Update your integrated system to the new Secret before the grace period ends.

Revoke a Key ​

Click Revoke on the row of the Key and confirm. A revoked Key stops working immediately, every integration using it fails, and the revocation cannot be undone.

View the Call Log ​

Click Call log at the top right of the card or on a Key's row. You can filter by Key and view the time, method, path, HTTP status, business code, duration (ms), and source IP of each call. The last 7 days are shown by default, and logs are kept for 180 days.

Legacy Key ​

If you previously integrated with the legacy protocol, a "Legacy key" (旧版密钥) row appears in the list after its first call (the old system's hytx-api-key, usable only on the legacy /api/wh endpoints). For a legacy key you can only view the last-used time and revoke it; it cannot be edited or rotated.

Legacy keys are not secure enough. We recommend creating a new Key as soon as possible and changing the legacy endpoint header to hytx-api-key: <new Key>.<new Secret> (the endpoint paths do not change). Once everything works, revoke the legacy key. See Legacy-Compatible Protocol.

Warehouse-Side API Keys ​

API Keys used by the warehouse side (warehouse administrators / warehouse managers) are issued by the warehouse in the warehouse back office, and can call warehouse-perspective endpoints such as locations and expected inbound. This section focuses on customer Keys; endpoints that warehouse Keys can use are noted on each page.

FAQ ​

Why can't I see the "Create API key" button? ​

You are signed in with a sub-account. Sign in to OMS with the main account and then create the Key.

I forgot to save the Secret. What now? ​

A Secret cannot be recovered. Click Rotate on the Key's row to generate a new Secret; the Key itself stays the same.

How long does the old Secret still work after rotating? ​

That is set by "Old secret grace period (hours)" at rotation time (24 hours by default). The dialog shows "The old secret keeps working until {time}".

Can I restore a revoked Key? ​

No. Revocation takes effect immediately and cannot be undone. Create a new Key if you need one.