Really early days for me learning to use the API as well as Python.
The code below Authenticates and passes back the token correctly - but I have no idea how to pass the session ID in the code after... I get an "invalid session ID error".
I simply need help with getting the "get" to authenticate and execute a simple request successfully. Thank you!
import requests
consumer_key = "xxxx"
consumer_secret = "xxxx"
username = "xxxx"
password = "xxxx"
payload = {
'grant_type': 'password',
'client_id': consumer_key,
'client_secret': consumer_secret,
'username': username,
'password': password
}
r = requests.post("https://login.salesforce.com/services/oauth2/token",
headers={"Content-Type":"application/x-www-form-urlencoded"},
data=payload)
print r.content
r = requests.get("https://ap2.salesforce.com/services/data/v36.0/wave")
print r.text