【发布时间】:2015-01-30 21:08:03
【问题描述】:
LinkedIn 的 API 允许用户将他们的电子邮件和密码提交到如下所示的表单中:
https://www.linkedin.com/uas/oauth2/authorization?client_id=nhrepd2sjd6k&raise_errors=true&redirect_uri=https%3A%2F%2Fwww.treatings.co%2Fv1%2Ftoken_exchanges&response_type=code&scope=r_fullprofile+r_emailaddress&state=JV4qrQfA8p%2BAKtyq1DFgaaXeRZSg50lQrAU%2Fc%2BBSXaU%3D
使用正确的凭据,LinkedIn 将使用code 和state 参数重定向到上述 URL 中的重定向 URI:
https://www.treatings.co/v1/token_exchanges?code=CODE&state=STATE
我有两个问题:
- 如何使用 Ruby 提交带有电子邮件和密码的表单 URL?
- 一旦我得到响应,我如何获得第二个URL?
谢谢!
【问题讨论】:
标签: ruby authentication https