0

I'm making an API using Python requests, and HTTP GET is working fine, but I'm having a little bit of trouble with HTTP POST. So, as with a lot of websites, you can read information, but in order to make a post request (such as following a user, or writing a post), you need to have an authenticated session. THIS website, uses google to log in. Normally, I would just pass the username:password into the POST request formdata to log in, but this google thing is pretty wonky (and quite frankly I'm not that experienced). Does anyone have a reference or an example to help me out? ;/

John Leonardo
  • 598
  • 3
  • 23

1 Answers1

-2

I do not know about python requests but to send an email its as easy as this

import yagmail
yagmail.SMTP(emailh).send(email, subject, body)

#emailh = your email (just username no @gmail.com)
#email = send to (full email including domain ***@gmail.com or ***@outlook.com)
#subject = subject of the message
#body = body of the message

Even better

    emailh = raw_input('Your email: ')
    email = raw_input('Send to: ')
    subject = raw_input('Subject: ')
    body = raw_input('Body: ')
    yagmail.SMTP(emailh).send(email, subject, body)
    print('Email Sent.')

If this is what you are talking about anyway.

This page might be useful link

Community
  • 1
  • 1
Ethan Lee
  • 1
  • 3