Up to my knowledge, Twitter has stopped using username and password authentication in order to post tweets from a Java app. However, it allows OAuth only (using consumer keys, access tokens etc.).
Is there still any approach or workaround to use username and password based authentication to tweet from a Java app?
No there isn't anymore. If you want to be able to use the API you must follow these steps:
Go to Twitter Apps and login with your regular twitter account
assuming you have one, if not you need to create one.
Once signed in click on Create New App button.
Fill out the application (Name, description, and whatever else it
requires).
Create your key and access tokens. Share those with users that you
trust as they'll be used to access the twitter API to read/write
information.
Give the application you created a "Read and Write" permission based
on what you asked in the question.
Then depending on the software/language you use there's a plenty of existing packages that can help you access and obtain the information from the API.
Related
I'm using angular, google app engine and JAVA on the backend server.
User can authenticate without problem with an opendId connect URL where code is passed back to my server to authenticate.
Now what I wan't to do is send mail to user (refresh password, confirm account mail) and to myself (server error message) with my account myaccount#gmail.com.
Also I have sheets I need user to write and read datas to/from. Magically I've made it worked as an installed offline app (only 1 api at a time, I never made the two worked together).
I've tried service account but from a last post somebody explained me that in order to make gmail work I needed a g suite account which I don't have and suggest me to go through oAuth2 authentification. Now the question is how can I implement that in java with a single authentification, I explain, I wan't to authorize app to have access to certain scopes but it should be only be authorized once because I don't want user to have a consent screen popup and even if they had they couldn't authenticate as it is on the behalf of my personnal account. I don't think I can use installed app for a google app engine app but maybe I'm wrong.
just to let you know I have tried lot's of different manners and spent about 3/4 days trying to find a solution without clearly understanding/finding what to do.
Any help is greatly appreciated please let me know if you need more explanations or code.
I think you are missing a few key concepts here.
DATA
There are two types of data private user data and public data. Private user data is owned by a user and there for you must have permission or concent to access it. Public data is data that is owned by anyone.
Oauth2
Oauth2 is the protocol we use to request connect from a user for our applications to access their data. A user can grant you access to their gmail account and their google drive account granting you access to the sheets on their account.
Service accounts
Service accounts are preapproved dummy users. As a developers we can create service accounts and grant them access directly to our drive account then the service account will then be able to access to the data without being requiring consent as it already has pre approved access. (not all google apis support service accounts. gmail (with the exception of gsuite) and YouTube are two that dont)
What you are trying to do
However i do not understand why you want to use the users gmail account to send them an email. If you want to send them an email i would think you would be using your own email system.
If what you are trying to do is use your gmail account to send users of your application emails from YOU. Then you should consider going directly though the SMTP server to your own account. Having an application that uses the gmail api is one of the scopes that will be flagged by google when you try to get your application approved. You are going to be going though a lot of red tape with them to show why you need access to a users gmail account.
I am trying to create a desktop client through which we can login to https://(aws account id/ account alias).signin.aws.amazon.com/console using IAM user id , password and account name.
We have JavaMail API to login into gmail account. ( http://www.tutorialspoint.com/javamail_api/javamail_api_checking_emails.htm )
Similarly , we have RestFB api to login into facebook account.
Do we have similar type of API for aws? If not, is there any other way to achieve the same behavior most preferably in java but python is also fine.
Unless I do not understand your question correctly, what you are attempting is not supported. The IAM username and password for an account can only be used to manually log in to the console.
Q: Is there an authentication API to verify user logins?
No. There is no programmatic way to verify user logins.
https://aws.amazon.com/iam/faqs/#login_anchor
https://(aws account id/ account alias).signin.aws.amazon.com/console is an customized sign-in page url.
username/password is used when we manually log in to the console.
If you want to make programmatic calls, then you should create an access/secret keys for an IAM user, and use them to create an client to access respective AWS resource.
AWS implement SAML for federated access. See here: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html
Imagine you've to implement following user story:
"User should be able to publish message on social media(facebook/twitter/etc) using simple web form and one-click button[without need to login in fb/twitter/etc]."
In general, authentication in social networks is based on OAuth 2.0. Facebook distinguish three types of access tokens:
User access token
App access token
Page access token
I've tried first option with facebook4j, and it's working - however, we are supposed to supply token each time, we want to use it. I've found long-lived tokens, but their validity is also limited - 60 days.
Generating app access tokens is very simple, but I haven't succeed in publishing any post. From facebook docs:
App access tokens can also be used to publish content to Facebook on
behalf of a person who has granted an open graph publishing permission
to your application.
Page access tokens - I haven't tried. Is it possible to publish message on fb/twitter simultaneously, without login, of course, to predefined destination(fb wall)? If so, please provide me with any working example :)
Thanks in advance
I know there are other questions regarding this issue, but even after reading those, looking at the associated links and checking the QuickBooks docs, I'm struggling to understand it all and I feel like I'm going around in circles.
I need to create a load of invoices in my QuickBooks Online account based on data in Excel/CSV files. I will take a long time to do it manually (as well as being really tedious work) and I'll have to do it again in the future. I'm just trying to write a Java desktop application that will parse the file data and create the invoices in QuickBooks Online.
This is only for me and only for my companies QuickBooks account. I don't need my application to access other QuickBooks accounts, but I understand that I still need to go through the oAuth process (or do I?) to get the credentials that will allow me to make requests.
OAuthRequestValidator oauthValidator = new OAuthRequestValidator(
accessToken, accessTokenSecret, consumerKey, consumerSecret);
ServiceContext context = new ServiceContext(
realmID, IntuitServicesType.QBD, oauthValidator);
I keep hearing that I have to register my app with Intuit to get the consumerKey and consumerSecret, but when I try to do that through developer.intuit.com, it's requiring an app URL and host name domain. This is a desktop app, I don't have those.
Is there seriously no way to simply access my QuickBooks Online account using the SDK by just supplying my userID and password?
I understand that I still need to go through the oAuth process (or do I?)
Yes, you do.
but when I try to do that through developer.intuit.com, it's requiring an app URL and host name domain.
Just enter in localhost to get through the registration process.
Then, you can use Intuit's OAuth Playground tool to get the access tokens you need, without having to actually implement any website-based stuff.
https://appcenter.intuit.com/Playground/OAuth
Is there seriously no way to simply access my QuickBooks Online
account using the SDK by just supplying my userID and password?
There is no way to access your QuickBooks Online account programatically with just a username and password. You need to use OAuth.
It's really not that difficult if you just enter localhost in and use the Playground tool. Should take all of 30 minutes tops to get going.
I want to use AccountManager in Android, to verify a com.google account. I've already know how to get the account, But I've got several questions,
If the account is not in AccountManager, and the account self is under com.google domain, then how can I add it?
How AccountManager manage tokens? It retrieves tokens automatically, or I need to do it manually?
I'm trying to use Google Reader API with ClientLogin, then I may need password for the first time. If some com.google accounts are stored previously by other apps, can I use them to get the password?
Edit on 2011.08.20
To clarify the question, what I want to ask it this,
Google applications on Android has its own routine to verify Google accounts, and I want to know whether it's possible to call the routine created by Google applications, and get my own authority?
If there's no Google Account on Android phone, how can I add an account, which will be accepted by Google applications later?
If the account is not in AccountManager, and the account self is under com.google domain, then how can I add it?
If you simply want to have, for example, a button that lets the user add a Google account, consider invoking the ADD_ACCOUNT intent. Another, more advanced, option is to use AccountManager.addAccount.
How AccountManager manage tokens? It retrieves tokens automatically, or I need to do it manually?
The system manages tokens. Well, actually, applications register 'authenticators' which manage tokens for their corresponding service. An authenticator for Google accounts comes preloaded with most Android devices, and third party apps like Twitter add their own authenticators when installed. Apps that want to use Google accounts can request authentication tokens using AccountManager.getAuthToken.
I'm trying to use Google Reader API with ClientLogin, then I may need password for the first time. If some com.google accounts are stored previously by other apps, can I use them to get the password?
Your app should never ask the user for her Google password. Use the relevant AccountManager methods to request an auth token for Reader. Unfortunately, since Google Reader doesn't have a public API I can't assist further.