The goal of this project is to create a python script that is able to login to "https://my.xm.com/en/member/login" and return the "idToken" value stored in the local storage.

Job ID: 38068168

Budget: $10 – $30 USD

Here's some information on how the API calls on how the "idToken" is received.

Step 1
Login Flow & API call:
1. On the web page, Fill up the email & password on the login page. Press on "login"
2. A POST API call is made to "https://my.xm.com/member/auth" with returns set-cookies in the response header. It contains the "APPSESSID" cookie. This cookie will be used in the next API call.

Step 2
On the web page, Once you've landed on the homepage, Click on "Competitions" in the navigation tabs on the Left:
1. This would make a POST API call to "https://social.xm.com/pubapi/social-trading/v1/public/session/extend" which uses the "APPSESSID" cookie mentioned above.
2. The response of this API call should return "idToken" as one of the field

Here are the Acceptance Criteria's (AC) that need to be met for this project to be considered successful:
AC1: Script should be written in python
AC2: Script should automate the steps mentioned above to reach the outcome of returning "idToken" value
AC3: Script should be able to consistently do this on an hourly basis without failing.
Related categories: JavaScript Python Web Scraping HTML