How does Discord connect to third party APIs?

▼魔方 西西 提交于 2021-01-29 17:33:10

问题


I am trying to reproduce something similar in my app. I only see things like OAuth where you can "login" with an external API and a new user will be created/authenticated with their third party credentials. Or alternatively some authorization flow where access tokens must be refreshed every hour or so. Discord, however, connects to these APIs and does not create or login a new user, they only access the user's data from that external API and presents it on the Discord GUI. Furthermore, as a user I never need to "refresh" my connection to these apps, as long as the choice is enabled I will see my information from the third party API. For example, Spotify- as long as I have the connection enabled I can see my Spotify activity. What is going on behind the scenes to enable this?

来源:https://stackoverflow.com/questions/63587360/how-does-discord-connect-to-third-party-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!