Authenticate

Exchanges an access key and secret for a bearer token. Send the token as
Authorization: Bearer <token> on every other /api route.

The token is bound to the IP allowlist configured on the access key: a token
presented from an address outside ips is rejected as 401, not 403.
expiration is the token's lifetime in seconds, and allow_cash_out tells you
up front whether this key may call POST /api/payout. Deleting or changing
the access key revokes every token issued from it; authenticate again.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The authentication endpoint receives a key and secret as input parameters and returns a bearer access token together with its expiration time, expressed in seconds.


Integrators should avoid calling this endpoint frequently. The recommended practice is to authenticate once, cache the token, and reuse it for subsequent requests. A new authentication should only be performed shortly before the token expires, minimizing unnecessary endpoint calls and ensuring optimal system performance.

How to use your bearer access token:

curl --request POST \
     --url https://api.env.techworks.app/api/payin \
     --header 'Authorization: Bearer <token>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
Body Params

Authentication Credentials

string
required

Key is the access key's public identifier.

string
required

Secret is the access key's secret half, shown once at creation and never readable again.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json