-
Notifications
You must be signed in to change notification settings - Fork 20
Add TON Center API v2 auth details page #1494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates in ecosystem/api/toncenter/v2-authentication.mdx: I’ve left a couple of suggestions, so please apply the inline suggestions.
| ## Overview | ||
|
|
||
| The API v2 requires an API key for all methods, including the JSON-RPC endpoint. The key can be sent either in an HTTP header or as a query parameter. | ||
| To obtain an API key, please follow [this guide](./get-api-key). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Relative internal link path in v2 authentication doc
Line 8 links to the API key guide using a relative URL ./get-api-key. The extended style guide requires internal links to be root‑absolute and forbids ./ or ../ segments in Markdown link URLs (see https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L633-L637). Using a relative link here is brittle if the file moves and breaks consistency with other docs. This is treated as HIGH severity because link stability is critical for navigation and long‑term maintainability.
| To obtain an API key, please follow [this guide](./get-api-key). | |
| To obtain an API key, see the [TON Center API key guide](/ecosystem/api/toncenter/get-api-key). |
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| ```bash | ||
| curl "https://<host>/api/v2/getMasterchainInfo" \ | ||
| -H "X-API-Key: <YOUR_API_KEY>" | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Placeholders in curl examples are not defined on first use
The curl examples introduce placeholders <host>, <YOUR_API_KEY>, and <API_KEY> in commands without defining what each placeholder represents when they first appear (lines 24–25 and 33). The style guide requires placeholders in examples to follow the <ANGLE_CASE> convention and to be explicitly defined at first use to reduce copy/paste errors. Without nearby definitions, readers may be unsure which concrete values to substitute, especially for <host> and the difference (if any) between <YOUR_API_KEY> and <API_KEY>. Adding a short definitions block immediately after the first example keeps the examples self-contained and safer to reuse.
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No documentation issues detected.
closes #1025
Adds a page that explains how devs can use the API keys for v2 API