官术网_书友最值得收藏!

Application authentication

Application authentication is a form of authentication where the application makes API requests on its own behalf, without a user context. API calls are often rate limited per API method, but the pool each method draws from belongs to your entire application at large, rather than from a per-user limit.

For the purposes of social media analysis, we will use in most cases application authentication by creating an application on each social media platform that will query the related API.

There are several steps that are required to put in place a client with OAuth authorization:

  1. Creating a user/developer account: First of all, you have to register a user/developer account and provide personal information such as a valid email address, name, surname, country, and in many cases a valid telephone number (the verification process is done by sending you a text message with a code).
  2. Creating an application: Once you create your account, you will have access to a dashboard, which is very often called a developer console. It provides all the functionalities to manage your developer account, create and delete applications, or monitor your quota. In order to obtain access credentials you will have to create your first application via this interface.
  3. Obtaining access tokens: Then, you generate access tokens for your application and save them in a safe place. They will be used in your code to create an OAuth connection to the API.
  4. Authorizing HTTP requests (optional): Some APIs require HTTP request authorization, which means that a request has to contain an additional authorization header that provides the server with information about the identity of the application and permission scope.
  5. Setting up permission scopes (optional): Some APIs have the notion of multilevel permissions. In that case when you generate your API key you need to specify the scope for the key. Scope here refers to a set of allowed actions. Therefore, in cases where an application attempts an action that is out of its scope, it will be refused. This is designed as an additional security layer. Ideally one should use multiple API keys, each with restricted scopes, so that in the scenario where your API key is hijacked, due to the restrictions in its scope the level of potential harm is restricted.
  6. Connecting to the API using obtained access tokens: When all the preceding steps are configured, you can make requests using your access tokens. Now, the only limitation is the request quota, which depends on each platform.
主站蜘蛛池模板: 宣汉县| 天柱县| 金塔县| 正安县| 淮南市| 韶山市| 霞浦县| 澄迈县| 巢湖市| 韩城市| 武义县| 舟曲县| 大石桥市| 皮山县| 盱眙县| 玉龙| 朔州市| 曲松县| 正蓝旗| 朝阳县| 长泰县| 衡东县| 海林市| 闸北区| 邵阳市| 西青区| 潞城市| 深水埗区| 新乡市| 永修县| 鄂州市| 五大连池市| 潞西市| 满洲里市| 新龙县| 双柏县| 贡嘎县| 长宁区| 绥江县| 浮山县| 武隆县|