Workbench developer docs中文

Using the token in your own app

Your app can call the same pass-through wb call uses, with your personal token.

Get the token

export WB_TOKEN=$(wb token)

Send it as a bearer token on every request:

Authorization: Bearer <your token>

Keep it out of your code and your repository: read it from the environment or a secret store.

Point the vendor's SDK at Workbench

Each connection has a base URL:

https://desktop-api.wbench.io/v1/proxy/<connection>/

Use it wherever the vendor's documentation uses the vendor's own host, and send your Workbench token instead of the vendor's key. Everything else (paths, methods, query parameters, JSON bodies) is the vendor's own API. Each connection's page has curl, Python and TypeScript examples, with the vendor's official SDK where there is one:

Check who the token belongs to

curl https://desktop-api.wbench.io/v1/me -H "Authorization: Bearer $WB_TOKEN"

What comes back

When the token stops working

A 401 means the token expired or was revoked: run wb login again. A 403 says why in its message and details.reason.

Rules for the trial