REST SESSION.GET not working

1 post / 0 new
REST SESSION.GET not working

Hi there, I am trying to learn how to use python to connect to IG data. I use the following information from the REST page in IG labs. However, I don't seem to be able to extract me session details for confirmation.

The REST sessions.get code doesn't seem to be working

import requests
import json

url = ''
s = requests.Session()
s.headers = { 'Content-Type' : 'application/json; charset=UTF-8',
'Accept' : 'application/json; charset=UTF-8',
'VERSION' : '2',
data = { 'identifier' : 'XXXX',
'password' : 'XXXXX'

r = + '/session', json=data)
r = s.get(url + '/session')

Would any experts be able to kindly help?