Why do some API providers require an API key?

后端 未结 7 1019
谎友^
谎友^ 2021-02-03 11:43

Several web service APIs have you sign up for an API key. For example, UPS Web services requires a key, which is included in calls to their service -- In addition to the use

7条回答
  •  悲&欢浪女
    2021-02-03 11:47

    They could use it to signify which version of the API you are trying to use. Perhaps in Version 1.0, there is a method that takes a POST on www.UPS.com/search and there is another one in version 2.0 at the same address, but takes a different parameter set, or even returns data in a different format/style. Your program was built on V1.0 and expects a certain API contract. They want to be able to create V2.0 without interfering with their customer's products.

    That's just a guess, but it sounds good to me.

提交回复
热议问题