Authorize
First step of the OAuth 2.0 authorization flow for third-party app registrations. Redirects the user's browser to the Tradejini login page. After the user logs in, their browser is redirected to your redirect_uri with an authorization code in the query string. Pass that code to POST /api-gw/oauth/token to obtain an access token.
Use this flow when: your app authenticates on behalf of multiple Tradejini user accounts.
Prerequisite: Create an app in the Apps Section to obtain your client_id (API key) and client_secret.
Note: This endpoint performs a browser redirect and cannot be tested directly in this playground. See the authentication curl examples in the API overview.
Query Parameters
Your app's alphanumeric API key from the Apps Section app registration page. If the value does not match the registered app, authorization will be denied.
The callback URL registered in your app on the Apps Section. Must match exactly — if it does not, authorization will be denied.
As per oAuth specification this value should be "code"
This field value should be "general".
A literal string that will be return in the final redirection callback.
Response Body
application/json
application/json
curl -X GET "https://example.com/api-gw/oauth/authorize?client_id=string&redirect_uri=string&response_type=code&scope=general&state=string"{
"s": "error",
"msg": "Unauthorized"
}{
"s": "error",
"msg": "Unauthorized"
}