Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Маркеры доступа с ограниченным использованием обеспечивают защиту от подмены запросов и атак повторного воспроизведения , гарантируя, что действие будет выполнено пользователем, которому было отправлено сообщение. Защита достигается путем добавления уникального параметра токена к параметрам запроса и его проверки при вызове действия.
Параметр token должен быть сгенерирован как ключ, который можно использовать только для определенного действия и конкретного пользователя. Перед выполнением запрошенного действия следует убедиться, что токен действителен и соответствует тому, который вы сгенерировали для пользователя. Если токен совпадает, то действие может быть выполнено, и токен становится недействительным для будущих запросов.
Маркеры доступа должны быть отправлены пользователю как часть свойства urlHttpActionHandler . Например, если ваше приложение обрабатывает запросы на утверждение по адресу http://www.example.com/approve?requestId=123 , вам следует подумать о включении в него дополнительного параметра accessToken и прослушивать запросы, отправленные на http://www.example.com/approve?requestId=123&accessToken=xyz .
Комбинация requestId=123 и accessToken=xyz — это та, которую вы должны сгенерировать заранее, убедившись, что accessToken нельзя вывести из requestId . Любой запрос на утверждение с requestId=123 и без accessToken или с accessToken , не равным xyz должен быть отклонен. Как только этот запрос будет выполнен, любой будущий запрос с тем же идентификатором и токеном доступа также должен быть отклонен.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-25 UTC."],[],[],null,["# Limited Use Access Tokens\n\nLimited-Use Access Tokens provide protection from request spoofing and [replay attacks](http://en.wikipedia.org/wiki/Replay_attack), ensuring that the action is performed by the user the message was sent to. Protection is achieved by adding a unique token parameter to the request parameters and verifying it when the action is invoked.\n\nThe token parameter should be generated as a key that can only be used for a specific action and a specific user. Before the requested action is performed, you should check that the token is valid and matches the one you generated for the user. If the token matches then the action can be performed and the token becomes invalid for future requests.\n\nAccess tokens should be sent to the user as part of the `url` property of the [HttpActionHandler](/workspace/gmail/markup/reference/types/HttpActionHandler). For instance, if your application handles approval requests at `http://www.example.com/approve?requestId=123`, you should consider including an additional `accessToken` parameter to it and listen to requests sent to `http://www.example.com/approve?requestId=123&accessToken=xyz`.\n\nThe combination `requestId=123` and `accessToken=xyz` is the one that you have to generate in advance, making sure that the `accessToken` cannot be deduced from the `requestId`. Any approval request with `requestId=123` and no `accessToken` or with a `accessToken` not equal to `xyz` should be rejected. Once this request gets through, any future request with the same id and access token should be rejected too."]]