> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/security-testing-agent-apis/security-testing-orchestration/token.md).

# Token

Internal endpoints for cross-service authentication

## GET /api/v2/token

> Issue a cross-service token

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Token","description":"Internal endpoints for cross-service authentication"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Harness-Token_header_X-Harness-Token":[]}],"components":{"securitySchemes":{"X-Harness-Token_header_X-Harness-Token":{"type":"apiKey","name":"X-Harness-Token","in":"header"}},"schemas":{"TokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"Issued cross-service JWT"}},"required":["token"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/token":{"get":{"description":"Issue a cross-service token","operationId":"Token#IssueToken","parameters":[{"allowEmptyValue":true,"description":"Harness Account ID","in":"query","name":"accountId","schema":{"description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$","type":"string"}},{"allowEmptyValue":true,"in":"query","name":"audience","schema":{"items":{"enum":["sto-plugin","manager"],"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Harness internal shared secret","in":"header","name":"X-Harness-Token","required":true,"schema":{"description":"Harness internal shared secret","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"BadRequest: Bad Request response."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Unauthorized: Unauthorized response."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Forbidden: Forbidden response."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"TooManyRequests: Too Many Requests response."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"InternalServerError: Internal Server Error response."}},"tags":["Token"]}}}}
```
