Questions how to login to Amazon have been discussed for various environments on stackoverflow:
- PHP Curl - Cookies problem
- Remote login Amazon (KDP)
- Amazon Login with Webrequest
- Programatically login to Amazon with C#
- Cannot Login to Amazon with Ruby Mechanize ...
The mileage seems to vary depending on the approach taken. E.g. as of 2013 one comment was:
Amazon have since changed their login process, adding some sort of CSFR protection which makes it difficult to log in using cURL
Using Java I also had no luck trying the direct curl-like approach and fiddling with the OpenId parameters:
// https://www.amazon.com/ap/signin?
// _encoding=UTF8&
// openid.assoc_handle=usflex&
// openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&
// openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&
// openid.mode=checkid_setup&
// openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&
// openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&
// openid.pape.max_auth_age=0&
// openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fsign-in.html%3Fie%3DUTF8%26*Version*%3D1%26*entries*%3D0
Question:
Would using a ruby mechanize - like style work here and which would be a working mechanize equivalent on Java?