LinkedIn's API lets a user submit their email and password into a form that looks like the following:
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
With the correct credentials, LinkedIn redirects to the redirect URI in the above URL with code
and state
parameters:
https://www.treatings.co/v1/token_exchanges?code=CODE&state=STATE
I have two questions:
- How can I use Ruby to submit the form's URL with an email and password?
- Once I get a response, how do I obtain the URL in the second?
Thanks!