1
-1

[–] duannguyen 1 point -1 points (+0|-1) ago 

Search GitHub for Voat and see the sample source code. If it's C#, @PuttItOut has a nice C# wrapper for the API.

0
0

[–] AxisOfWevil [S] ago 

Im getting the same error with python and I'm using a direct example from SquishyStrawberry's source code. Maybe the error has something to do with the DDoS going on. I dunno. Ill try it in a few days. If someone has time can they look over the code below and let me know if I'm on the right track? I've left my token, username, and password out.

import urllib3.contrib.pyopenssl
import json
import requests

urllib3.contrib.pyopenssl.inject_into_urllib3()

url = 'https://fakevout.azurewebsites.net/api/token'
data = {'grant-type': 'password', 'username': username, 'password': password}
headers = {'Voat-apikey': api_key,'Content-Type': 'application/x-www-form-urlencoded'}

r = requests.post(url, headers, data)

print r.content

0
0

[–] PuttItOut ago 

Change the header key to Voat-ApiKey. See if casing is the problem.

0
0

[–] AxisOfWevil [S] ago 

Thanks for the advice. I'm using python. Found a python wrapper for Voat.co and I'm looking at the examples now.