> For the complete documentation index, see [llms.txt](https://docs.transactionlink.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.transactionlink.io/docs/transactionlink-api/api-reference/authentication.md).

# Authentication

{% hint style="info" %}
All API requests must be made over HTTPS. Any requests made over HTTP will fail.
{% endhint %}

### `POST` Authorize token

## Authorize workspace (deprecated)

> \*\*Deprecated\*\* — This endpoint issues a JWT Bearer token (\`accessToken\`) for workspace authentication. JWT-based authentication is deprecated in favor of organization tokens (\`tot\_\`). Use organization tokens obtained from the dashboard instead of this endpoint.

```json
{"openapi":"3.0.1","info":{"title":"TransactionLink API","version":"v3"},"servers":[{"url":"https://api.transactionlink.io","description":"Production"}],"paths":{"/auth/authorize":{"post":{"deprecated":true,"tags":["Authentication"],"summary":"Authorize workspace (deprecated)","description":"**Deprecated** — This endpoint issues a JWT Bearer token (`accessToken`) for workspace authentication. JWT-based authentication is deprecated in favor of organization tokens (`tot_`). Use organization tokens obtained from the dashboard instead of this endpoint.","operationId":"auth-authorize","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCredentialsRequest"}}}},"responses":{"200":{"description":"OK – JWT tokens issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationResponse"}}}},"400":{"description":"Bad Request – invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error – unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"WorkspaceCredentialsRequest":{"title":"WorkspaceCredentialsRequest","required":["key","secret"],"type":"object","properties":{"key":{"type":"string","description":"Workspace API key"},"secret":{"type":"string","description":"Workspace API secret"}}},"AuthenticationResponse":{"title":"AuthenticationResponse","required":["accessToken","refreshToken","tokenType","expiryDuration"],"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token (Bearer)"},"refreshToken":{"type":"string","description":"Refresh token for obtaining a new access token"},"tokenType":{"type":"string","description":"Token type — always `Bearer`"},"expiryDuration":{"type":"integer","format":"int64","description":"Token validity duration in seconds"}}},"ErrorResponse":{"required":["errors","fingerprint"],"type":"object","properties":{"fingerprint":{"type":"string","description":"Unique identifier for this error instance"},"errors":{"type":"array","description":"List of error details","items":{"required":["code","message"],"properties":{"code":{"type":"string","description":"Error code representing the type of error"},"message":{"type":"string","description":"Error message providing more details about the error"}}}}}}}}}
```

### `POST` Refresh access token

## Refresh JWT token (deprecated)

> \*\*Deprecated\*\* — This endpoint refreshes a JWT Bearer token using a refresh token. JWT-based authentication is deprecated in favor of organization tokens (\`tot\_\`). Use organization tokens obtained from the dashboard instead of this endpoint.

```json
{"openapi":"3.0.1","info":{"title":"TransactionLink API","version":"v3"},"servers":[{"url":"https://api.transactionlink.io","description":"Production"}],"paths":{"/auth/refresh":{"post":{"deprecated":true,"tags":["Authentication"],"summary":"Refresh JWT token (deprecated)","description":"**Deprecated** — This endpoint refreshes a JWT Bearer token using a refresh token. JWT-based authentication is deprecated in favor of organization tokens (`tot_`). Use organization tokens obtained from the dashboard instead of this endpoint.","operationId":"auth-refresh","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefreshRequest"}}}},"responses":{"200":{"description":"OK – new JWT tokens issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationResponse"}}}},"400":{"description":"Bad Request – invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error – unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"TokenRefreshRequest":{"title":"TokenRefreshRequest","required":["refreshToken"],"type":"object","properties":{"refreshToken":{"type":"string","description":"Refresh token obtained from a previous authorization"}}},"AuthenticationResponse":{"title":"AuthenticationResponse","required":["accessToken","refreshToken","tokenType","expiryDuration"],"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token (Bearer)"},"refreshToken":{"type":"string","description":"Refresh token for obtaining a new access token"},"tokenType":{"type":"string","description":"Token type — always `Bearer`"},"expiryDuration":{"type":"integer","format":"int64","description":"Token validity duration in seconds"}}},"ErrorResponse":{"required":["errors","fingerprint"],"type":"object","properties":{"fingerprint":{"type":"string","description":"Unique identifier for this error instance"},"errors":{"type":"array","description":"List of error details","items":{"required":["code","message"],"properties":{"code":{"type":"string","description":"Error code representing the type of error"},"message":{"type":"string","description":"Error message providing more details about the error"}}}}}}}}}
```

### `GET` Public key

{% openapi src="/files/3C6JXAGWTFuo5cN4kc3G" path="/auth/webhooks/key/{keyId}" method="get" %}
[authorization.yml](https://4264774896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTuZUhAUswS7SDAPD9DAo%2Fuploads%2Ftd7ZfYIDm5Qs3YNMNpyG%2Fauthorization.yml?alt=media\&token=35306309-7975-488d-93e0-1f0416c9bf4d)
{% endopenapi %}
