@
@
@Twitt2017-05-25 00:10:50
Facebook
@Twitt, 2017-05-25 00:10:50

Why do many services need to get an access token to work with api?

The question is in the title as a whole.
When I worked with VK Api, I could easily refer to the address api.vk.com/method/ - any method that can get the usual information about the user, comments on the page, wall, etc., while receiving and specifying the key access is not required. And on Facebook, I got into the Graph API, it says that it is necessary to get the user's access key, even if I want to get the slightest information about the owner of the page. That is, a site working with fb api without the obligatory login to the user's facebook can no longer be done.
It is worth noting that I met this not only on Facebook, but also on classmates, mail ru, instagram, google services.
So what determines whether a token is required or not? Or does it depend on the loyalty of each service?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Philipp, 2017-05-25
_

You should start by reading the specification https://tools.ietf.org/html/rfc6749
In a nutshell - the implementation of the VKontakte OAuth API is not complete.
The specification states that a token is required to grant access to a protected resource. On Facebook, most of the information has controlled access, such as privacy or the number of requests over a period of time. Therefore, using a token allows this system to work. Facebook has a rather complicated access restriction system - there is a limit at the level of the token and the application itself.
Plus, Facebook takes privacy quite seriously, so it's impossible to work without a token.
The token is a prerequisite for interacting with the API via OAuth. This is part of the protocol.
Installing an application is a standard practice in the civilized world. This is what confirms that you take your customer data seriously.

A
Artem, 2017-05-25
@devspec

token is part of the OAuth authorization method.
This is not related to the loyalty or disloyalty of certain services - it is related to what technology they have chosen to authorize and manage authorized users.

X
xmoonlight, 2017-05-25
@xmoonlight

without a token - impersonal access to API methods
with a token - controlled access to API methods
Why with a token: to collect information for various internal needs of the service.

S
Saboteur, 2017-05-25
@saboteur_kiev

By tokens, the site providing the API collects metrics - which methods and how many times were requested.
Based on this information, the site balances the load, decides which methods need to be redone, which methods should be limited in calls/second or per hour.
Using the same information, you can remove certain limits for money, which allows you to personally monetize the API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question