The documentation says that to get a token, you must first send a request to https://login.dnevnik.ru /. Please add "login.dnevnik.ru " to the white list
The documentation says that to get a token, you must first send a request to https://login.dnevnik.ru /. Please add "login.dnevnik.ru " to the white list
It doesn't look like an API endpoint though.
But this is required by the developers
From the documentation, it looks like it's an endpoint that someone needs to access from their browser, and the result is an access token. It's not meant to be accessed by your code. Instead, your website redirects someone who is using it to that URL, and they interact with the site there. That will then redirect them back to your site, providing you with an access token in the GET parameters of the URL. You don't need a site to be whitelisted for that process.
From the api: Procedure for obtaining an access token: 1.A third-party application redirects the user to https://login.dnevnik.ru/oauth2?response_type=<token|code>&client_id=<client_id>&scope=<scope>&redirect_uri=<redirect_uri>&state=<state>. Request parameters: <...>
2.After the user's refusal or confirmation, a redirect occurs to the specified address.
This is the only way to get a token for further work
Yes, that's what I said above. Your site returns a redirect response to the user, pointing them at https://login.dnevnik.ru/oauth2?response_type=<token|code>&client_id=<client_id>&scope=<scope>&redirect_uri=<redirect_uri>&state=<state>
. Doing that does not require login.dnevnik.ru
to be whitelisted. You can return a redirect to any site, regardless of whether it is on the whitelist or not.