self.baseUrl = "http://api.pinterest.com/v3/"
self.userAgent = "Pinterest for Android/2.6.1 (d2att; 4.4.2)"
self.clientId = "1431602"
self.clientSecret = "492124fd20e80e0f678f7a03344875f9b6234e2b"
#Install ID is a 16 byte hex-encoded UUID4 - generate it randomly
self.post_headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Host": "api.pinterest.com",
"Connection": "Keep-Alive",
"User-Agent": self.userAgent,
"Accept-Encoding": "gzip",
"X-Pinterest-InstallId": self.installId,
"Accept-Language": "en_US",
}
#Register account
#Endpoint: self.baseUrl + "register/email"
#HTTP Method: POST
account_info = {
"first_name" : "John",
"last_name" : "Smith",
"gender" : "male",
"email" : "[email protected]",
"locale" : "en-US",
"username" : "AccountUsernameHere",
"password" : "supersecretpassword"
}
"""
Every API request is sent with three parameters:
client_id={The client ID for Pinterest's API account}
timestamp={Current UNIX Timestamp - dat epoch doe}
oauth_signature={an oAuth signature for the request parameters and the endpoint/path}
"""