I wonder how can I send invitation to connect via linkedin-oauth2 gem?
I don't mean sending email or inmail, but simple invitation to connect, like friendship in facebook.
I just patched a version of the linkedin gem to include the connect_by_email(email) method. https://github.com/brianpetro/linkedin
For example:
client.connect_by_email("you#example.com")
Hope that helps.
I applied this to an oauth2 fork in case anyone needs it.
https://github.com/benbruscella/linkedin-oauth2
Related
This is my first time interacting with Google API and I'm using python3.9 with this library Python Telegram Bot
I want to access a user Google API Calendar via a telegram bot and I can't seem to find any article to guide me through it. My key problem (I think) is redirecting the success authorization flow back to telegram bot.
This is what I have in mind:
In the telegram app, user send '/send' to bot
Bot receive message and return a google an authorization link to user
User clink on authorization link and allow access
Bot receive authorization access and completes the Oauth flow
The problem lies betweeen step 3 and 4. A standard authorization link is
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<clientid>&redirect_uri=<redirect_uri>&scope=<scope>&state<state>&access_type=offline
How do I send the authorization link back to my telegram bot? Should I create another API endpoint to receive that authorization link? Or can I send telegram api send_message() in the <redirect_uri> to redirect the success message to my bot.
Update 1
Thanks to CallMeStag, I manage to figure out a way to complete the oauth process. For people who faced the same problem, this is what I did
Pre-requisite: Credentials is created in google console api - Web application. redirect_uri set as localhost:8000 (During development phase)
User send '/send' to bot
Bot receive message and return an authorization link https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<clientid>&redirect_uri=http://localhost:8000/&scope=<scope>&state<state>&access_type=offline
User click on link to authenticate and it will redirect to http://localhost:8000. Used fastapi as a webhook to receive the message. Capture the authorization code, use google.oauthlib.flow to complete the authorization process. Next, redirect user back to telegram link https://t.me/<botname>
Start using user google calendar
It's currently indeed not very straight forward for a PTB-application to listen for external updates (the auth verification in this cas) - see also this issue. Currently it might be easiest for you to set up a custom webhook application that runs in parallel to the Updater - e.g. using flask/django/starlette/fastapi/…. Alternatively, if you're using webhooks for your bot anyway, you can patch the Updater to do the job for you. Although that requires some manual work - see here for an example.
Once you are able to listen to updates coming from Google, handling them can be done via PTBs usual handler setup, specifically via the TypeHandler or even a custom Handler subclass - see this FAQ entry.
Regarding the redirect url: You'll want to redirect your user back to your bot, so you'll have to provide a link that does that. Bot.link should probably do the trick.
Disclaimer: I'm currently the maintainer of python-telegram-bot.
I want to send an e-mail using gmail API.
I want to know if the email was received successfully. And if not, what the problem. (Such as SMTP Log)
I can use Google Admin G-Suite if need.
How can I do it?
Thank you.
What you are looking for is Request read receipt after an email is sent. This would notify the sender when the recipient reads the email.
This is not something that is currently available in the gmail api. you may want to consider submitting a feature request here
How to verify an email provided during registration is a real one? Confirmation link is an obvious choice, but I've seen websites where some kind of email verification happens right after you click 'register'. If email is fake, the process stops. How can this be done in Spring?
(example: safaribooksonline)
You have to check if the mail got bounced. If it does, it's not a valid email. You can use an api provided by neverbounce and here is the github link for that in java.
You can try the MailboxValidator API.
Just sign up for the free API key at https://www.mailboxvalidator.com/plans#api
Then you can use the Java code at https://github.com/MailboxValidator/mailboxvalidator-java or use Maven https://mvnrepository.com/artifact/com.mailboxvalidator/mailboxvalidator-java/1.0.0
i want to develop office app and i want to sync email from outlook to Google account.
then,
which scope i use?
how to pass email data to URL and on which URL?
if possible to give me example
i use this two scope for authentication or to get user info.
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
i refer this stack overflow link :
link
another question is i can migrate email to example#gmail.com(gmail account)?
i use a Google playground to check email migrate scope then it give error to invalid access of API and it proper work if i use example#domain.com to migrate email.
If you are trying to migrate emails from outlook to GApps, you should use the email migration API scope:
https://apps-apis.google.com/a/feeds/migration/
Google also has an official tool that you can use to sync Outlook to GApps. https://tools.google.com/dlpage/gappssync <- check it out.
Old topic, but might be useful for someone else..
to #gmail accounts - Mail Fetcher
https://www.youtube.com/watch?v=gphzjf6sLRc
However this does not preserve folder structure.
Options like GAMMO (https://tools.google.com/dlpage/outlookmigration) and GAMME(https://tools.google.com/dlpage/exchangemigration) work only for migrations TO a business Google For Work account, not to personal gmail. GAMME also migrates between IMAP servers.
Another option is to export your PST file, put it in Outlook, sync your #gmail.com and drag/drop emails to your gmail PST which will sync up to the server. There is a chance of losing data though!
Is there some way to receive emails with Sinatra? I've seen the pages that say how to do it with RoR, but none without. I have also found out how to send emails with the gem Pony. Thanks!
I believe you are looking for the mail gem (github). It has send and receive capability.
Update: I forgot that there is a Google Group too
Rails uses mail gem in order to send and receive emails. This gem can be used in Sinatra just as easily.