-
Notifications
You must be signed in to change notification settings - Fork 24
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.
|
/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.
|
|
||
| ## Overview | ||
|
|
||
| The API v2 requires an API key for all methods, including the JSON-RPC endpoint. |
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.
|
|
||
| **Definitions:** | ||
|
|
||
| - `<HOST>` - The base URL of the TON Center API instance (`toncenter.com` for example). |
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.
| 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, see the [TON Center API key guide](/ecosystem/api/toncenter/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.
Do we have any expiration limit on the API key? Are there any recommendations to rotate the API key?
| The key can be sent either in an HTTP header or as a query parameter. | ||
|
|
||
| To obtain an API key, see the [TON Center API key guide](/ecosystem/api/toncenter/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.
Add a danger reminder of the importance of securely storing the API key.
Example:
Security
Prefer read‑only tokens for public access, scope server
tokens to only what you need, rotate long‑lived
tokens, and store them in a secrets manager.
Never expose admin tokens in client‑side code.
Extra reference: https://docs.stripe.com/keys-best-practices
| "method": "getMasterchainInfo", | ||
| "params": {} | ||
| }' | ||
| ``` |
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.
Can we specify the error codes related to API-KEYs here?



closes #1025
Adds a page that explains how devs can use the API keys for v2 API