Hello again.
As a newbie I find it incredible to make use of the functionalities of an API in a programmatic way.
The possibility of being able to vote what interests you is very interesting that’s why I want to know what I’m doing on it, however I have no choice to come here and trust that someone sees a little further than me.
Here’s what I have: :
data = {'grant_type': 'password',
'username': 'user_name',
'password': reddit_password }
payload = {"dir": 1, "id":thread}
base_url = "https://oauth.reddit.com/"
auth = requests.auth.HTTPBasicAuth(CLIENT_ID, SECRET_KEY)
r = requests.post(base_url + 'api/vote',
data=data,
headers={'user-agent': 'tutorialAPI by username'},
params = payload,
auth=auth)
status = response.status_code
print(r.text)
status
What I expected to happen:
200
and some type of message confirming the vote (¿?).
I have read (perhaps I have not understood it well) that this type of practices to be able to be automated are monitored in a “human” way, if this were so it would have a delay, but I do not think that even my request for a vote will arrive.
What actually happened:
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>
403
As always thank you very much to everyone.
See you.
A&E.