Skip to content

authOAuth2FieldsFormat

BlackMagnusSon edited this page Oct 14, 2020 · 1 revision

Response format correctness test (/authorize)

In addition to general validation, it is verified that expiration is in the future.

Possible issues:

Request error

Error on sending HTTP request to /authorize endpoint

Read error

Error reading body of HTTP response to request to /authorize endpoint

Invalid status code

Response status code is not 200

Parse error

Response body format is not compliant with the spec https://www.tradingview.com/rest-api-spec/#operation/authorize

  • response body is not a JSON data
  • the "s" field is not equal to "ok"
  • "access_token" field is empty string or missing
  • "expiration" field is not a number
  • "expiration" field is not an integer number

Invalid expiration time

Expiration time of the token is wrong (is not in the future)