Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Issue OAuth client-credentials access token

Enterprise Governance, Security & Access

POST

/oauth/token

Issue OAuth client-credentials access token

Production onlycreateOAuthToken

Issues a short-lived Bearer token for partners that have OAuth client credentials enabled in their enterprise security policy. Provide the partner API key as the client secret via HTTP Basic auth, form body, or JSON body.

Parameters

This endpoint has no path or query parameters.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Request body

grant_typeclient_credentials
client_idstring

Optional partner client identifier. Defaults to the authenticated key document id.

client_secretstringRequired

Partner API key used as the client secret.

scopestring

Space-delimited scopes requested for the short-lived access token.

Example: "trading:write reports:read"

Response fields

access_tokenstring

Example: "ms_oauth_..."

token_typestring

Example: "Bearer"

expires_ininteger

Example: 900

scopestring

Response codes

200Short-lived OAuth access token.
403OAuth client credentials are not enabled for this partner.