title: Akamai Python Login with Nike
body: <p>I have a python script that is to help me log into nike.com I have created everything so far including the sensor data. I'd happily share with someone who can help. However when I am trying to log in I keep getting 403 errors. Even though the sensor data and everything seems flawless and correctly calculated. It mimics everything leading up to logging into the website. It goes to the product page, api, static, sessions.html, and then tried to perform a login.
  still 403 error</p>
  <p>let me give you a sample of the code itself where I am making the request. This is after 2000 lines of coding:</p>
  <pre><code>cookies = {
  'geoloc': self.geoloc,
  'AKA_A2': self.AKA_A2,
  'bm_sz': self.bm_sz,
  'ak_bmsc': self.ak_bmsc1,
  'bm_sv': self.bm_sv2,
  '_abck': abck,
  'anonymousId': self.anonymousId,
  }
  headers = {
  'accept': '*/*',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'en-US,en;q=0.9',
  'content-length': '170',
  'content-type': 'application/json',
  'origin': 'https://www.nike.com',
  'referer': PRODUCTURL,
  'sec-fetch-dest': 'empty',
  'sec-fetch-mode': 'cors',
  'sec-fetch-site': 'same-site',
  'user-agent': USER_AGENT,
  
  }
  
  data = {
  'client_id': self.CLIENTID,
  'grant_type': 'password',
  'password:': password,
  'username:': username,
  'ux_id': 'com.nike.commerce.snkrs.web',
  }
  
  params = {
  'appVersion': '814',
  'experienceVersion': '814',
  'uxid': 'com.nike.commerce.snkrs.web',
  'locale': 'en_US',
  'backendEnvironment': 'identity',
  'browser': 'Google%20Inc.',
  'os': 'undefined',
  'mobile': 'false',
  'native': 'false',
  'visit': '1',
  'visitor': self.xnikevisitorid,
  }
  
  response = session.post(&quot;https://unite.nike.com/login?&quot;, headers=headers, cookies=cookies, data=data, params=params)
  print(abck)
  print(response)
  print(response.text)
  cookies = requests.utils.dict_from_cookiejar(session.cookies)
  print(&quot;Session with header Cookies &quot;, response.cookies.keys())
  abck = cookies['_abck']
  bmsv = cookies['bm_sv']
  time.sleep(0.4)
  </code></pre>
  <p>This is a sample of the final sensor_data created for the most recent static page before the login page. The static page all give a 201 response. I am not getting any errors anywhere else.</p>
  <pre><code>7a74G7m23Vrp0o5c9196521.64-1,2,-94,-100,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36,uaend,12147,20030107,en-US,Gecko,3,0,0,0,393678,9621785,1440,815,1440,900,992,618,992,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:1,bat:1,x11:0,x12:1,8983,0.683910876342,800004810692,0,loc:-1,2,-94,-101,do_en,dm_en,t_en-1,2,-94,-105,-1,2,-94,-102,-1,2,-94,-108,-1,2,-94,-110,0,1,1340,1370,1033;1,1,1362,1164,1813;2,1,1394,1383,1930;3,1,1120,1166,1951;4,1,1081,1144,1990;5,1,1277,1316,2104;6,1,1116,1126,2183;7,1,1318,1099,2343;12,1,1178,1196,3169;13,1,1160,1219,3190;14,1,1208,1157,3249;15,1,1200,1232,3287;16,1,1078,1114,3311;17,1,1218,1286,3366;18,1,1283,1082,3415;20,1,1334,1248,3656;21,1,1350,1115,3771;22,1,1220,1280,3839;23,1,1361,1157,3958;24,1,1307,1198,4020;25,1,1112,1353,4108;26,1,1082,1230,4180;28,1,1291,1267,4213;29,1,1108,1200,4238;30,1,1135,1248,4564;31,1,1342,1365,4590;32,1,1373,1133,4666;33,1,1149,1325,4759;34,1,1232,1075,4907;40,1,1169,1356,5365;41,1,1141,1312,5382;42,1,1162,1277,5565;43,1,1284,1290,5691;44,1,1102,1329,5898;45,1,1227,1159,6022;46,1,1366,1358,6185;-1,2,-94,-117,-1,2,-94,-111,0,584,-1,7.20,-1.10;1,616,-1,8.80,-2.80;2,893,-1,8.70,-1.40;3,1002,-1,3.90,-2.60;4,1025,-1,3.80,-1.80;5,1069,-1,8.30,-2.90;6,1774,-1,2.90,-2.90;7,1844,-1,2.10,-4.70;8,1905,-1,6.40,-8.10;9,2001,-1,4.10,-4.50;2,5077,-1,0.30,-1.40;3,6087,-1,0.70,-9.50;4,6128,-1,0.40,-9.80;5,6662,-1,5.30,-6.90;6,12238,-1,1.50,-2.50;7,12920,-1,9.70,-3.80;8,14641,-1,3.80,-2.50;9,14949,-1,4.30,-6.60;-1,2,-94,-109,0,584,-1,-1,-1,-7.50,-4.50,9.20,-1,-1,-1;1,616,-1,-1,-1,-2.60,-2.40,8.70,-1,-1,-1;2,893,-1,-1,-1,-6.90,-5.10,4.90,-1,-1,-1;3,1002,-1,-1,-1,-1.50,-7.70,9.40,-1,-1,-1;4,1025,-1,-1,-1,-0.90,-6.80,3.90,-1,-1,-1;5,1069,-1,-1,-1,-8.40,-7.60,7.40,-1,-1,-1;6,1774,-1,-1,-1,-6.70,-6.80,6.70,-1,-1,-1;7,1844,-1,-1,-1,-3.80,-2.10,6.30,-1,-1,-1;8,1905,-1,-1,-1,-4.80,-2.30,4.50,-1,-1,-1;9,2001,-1,-1,-1,-8.10,-6.20,4.90,-1,-1,-1;2,5077,-1,-1,-1,-8.30,-4.70,1.50,-1,-1,-1;3,6087,-1,-1,-1,-8.90,-8.80,7.20,-1,-1,-1;4,6128,-1,-1,-1,-0.70,-7.80,5.30,-1,-1,-1;5,6662,-1,-1,-1,-3.50,-2.90,2.30,-1,-1,-1;6,12238,-1,-1,-1,-6.50,-8.10,2.20,-1,-1,-1;7,12920,-1,-1,-1,-7.70,-7.10,1.90,-1,-1,-1;8,14641,-1,-1,-1,-0.70,-2.30,7.80,-1,-1,-1;9,14949,-1,-1,-1,-2.30,-7.50,5.80,-1,-1,-1;-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,https://www.nike.com/launch/t/killshot-og-gorge-green-1,2,-94,-115,1,227268,32,103419,91504,0,422159,7123,0,1600009621384,4,17116,0,10,7123,0,0,7130,8334,0,B365E1BE8738DCC791EF1B57E6EB08BC~-1~YAAQ3KLbF66NJ1J0AQAAKU0BiASuER6aZYo1M/jJirG3p5QqVSngbpiOBV0x+lpj1kPuFFfoGPVClQDVgry7gFIUet1/KOy8rQdp3jqN+0xx/LuFPkAcbaENujOqnC+4iSoEU8XOwFIlj9fJ2XIpMc1XST4Xy7n8ZDOPd9rcbiFYdNZZ36pQUna325824AjnpRwMMLn28zb1ctv7DRaUGDSIVVNX5WEpROhScrhEoWyDhlXtw149DUT/WSu6NSwYEr5zvLZx+UgbVIl36REdZfo2Mydy5STUXPeMAogZJvoDDNRyvrANdjCbzw9BLmDjHvw9ob4CsLgNV/HJSqu8vFPUWA==~-1~||1-ECrOeLGptm-1500-10-1000-2||~-1,34483,380,1600009621384,30261693,PiZtE,32848,61-1,2,-94,-106,3,5-1,2,-94,-119,17,80,56,39,122,63,185,22,48,17,8,13,9,390,-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-126,-1,2,-94,-127,11321144241322243122-1,2,-94,-70,1008762800;-2011384053;dis;,7,8;true;true;true;240;true;24;24;true;false;-1-1,2,-94,-80,5561-1,2,-94,-116,86596110-1,2,-94,-118,176877-1,2,-94,-129,f80d2f06bb6079f933a24c35bef2005cd2736f91ae877632c8f2d83d3b50eb34,1,122931c7ece5ae8ca5acada410ae9c52cfa6ab41ca356c0324f18cd3a4227682,Google Inc.,Google SwiftShader,76ff9db3820ac1d0e96fcd60f1c52b8062afb79b134e536e04d7e729b855949b,26-1,2,-94,-121,;27;21;0
  </code></pre>