你可以在这里看到这个过程http://strava.github.io/api/v3/oauth/。
在 strava 中注册您的应用程序后,您将获得密钥和密码。现在,要获取用户访问代码,您需要共享接受链接 - 类似于https://www.strava.com/oauth/authorize?client_id=9&response_type=code&redirect_uri=http://localhost/token_exchange.php&approval_prompt=force与用户联系并请求他们授权您的应用程序。一旦用户授权您的应用程序,他将使用查询字符串中的访问代码重定向到您的网站。(http://localhost/token_exchange.php?state=&code=9d89636f3ad420fad5727e8591193aeeab9b2310)。例如。在上面的 URL 访问代码中是 - 9d89636f3ad420fad5727e8591193aeeab9b2310。