Calling Yahoo API through OAuth - authentication

Spending my whole day on yahoo docs and here and there finally I am asking it here having failed in all attempts.I am implementing login with yahoo on my site using yahoo oauth. After a user login I need to get his profile.
I have successfully retrieved access token and completed the authorization flow as mentioned here:-
Yahoo OAuth authorization flow
After having the access token I need to retrieve the user profile by just making a simple Yahoo API call as mentioned here
But I not able to the same. Sometimes it gives me token rejected sometimes signature invalid,timestamp rejected e.t.c. I have seen similar type of question on Yahoo Forums but there are no replies to that people(I wonder what they did).
I would be really thankful if someone can describe this step completely, very clearly(signatures,methods,timestamp e.t.c) as it will be useful for users having similar problems. I am using JAVA language.
Thanking you in advance.

Related

linkedin api v2: "Not enough permissions to access" for /people

My question is similar for Linkedin v2 api: Not enough permissions to access: GET /countriesV2, LinkedIn V2 api: Not enough permissions to access /me GET, Not enough permissions to access /me GET and others, but works with /v2/organizations/ endpoint (that's why I think the app is already applied for api: https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program).
That's not my app - my client's one.
My task is getting members' info, but any calls to /v2/people/ endpoint fall.
The r_basicprofile permission is set and I no need for extra profile fields.
Now I see a couple of problems with linkedin REST API:
most of examples are for v1
v1 doesn't work at all
links to the linkedin site (like https://developer.linkedin.com/comment/NNNNN#comment-NNNNN%23comment-NNNNN) mostly don't work (about 95-99%)
I can't even call samples from developer.linkedin.com
I asked about this on linkedin help forum. I don't understand is this api works or not?
Does anyone have a successful experience with /v2/people/ endpoint?
if you really want to use V2 apply to the partnership that is required.
but because you need only basic profile info try this :
https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,picture-url,email-address,public-profile-url)?format=json
this will return the information of the person who is loggedin.
if you want information of another person try this:
https://api.linkedin.com/v1/people/[user_id]:(id,first-name,last-name,headline,picture-url,email-address,public-profile-url)?format=json
hopefully this works for you.

How to get twitter accessToken from java?

I'm creating a web application which needs some details of the user's twitter account. How can I get the twitter accessToken and access the twitter API. When I was searching this, I found that I had to create my application in twitter developers site Which I dont want at all. I've created my simple web application in java, in which i need to use twitter API. Is that possible??? Please help me out.
Generally speaking, Stack Overflow / Stack Exchange work best when you have a specific code question that we can clarify for you. This question is very broad so it is less simple to provide you with a direct solution.
In order to access the details of a user's Twitter account, you need to use the Twitter API. Twitter uses OAuth for authentication, so you'll need to code the login flow to get a user accessToken. You also need to register an app with Twitter on apps.twitter.com in order to get a consumerKey and consumerSecret to uniquely identify your app.
Since you're using Java, you might find Twitter4J a useful library for helping you with this. It comes with some pretty good samples that should help you to understand what you'll need to build.

Instagram API Authentication

I'm a little confused on how authentication works in Instagram. I want to display Instagram posts on a widget. But if I manually generate a single access_token I'm worried about hitting the limit (5000/hour) as it is a large web application.
Here's what I'm thinking: Have each user authenticate with their Instagram account and store their access_tokens and use the tokens to query Instagram's API. So essentially each user will be presented with Instagram posts queried using their access_token. And if the token expired for whatever reason I can easily have them re-authenticate. I need each user to authenticate anyway for other purposes.
I am not sure if the server could re-authenticate while providing a seamless experience for users.
Is this the right approach or is my thought process completely off?
EDIT: So I decided to have each user authenticate and call the Instagram API with each user's access_token. Everything has been working great. However, while testing the authentication one of my test accounts, I received this message "We noticed some unusual activity on your account. We'll send you a security code to verify your account." Are my API queries seen as unusual by Instagram if I'm querying public posts by tag for example? I'm worried my approach will cause end users to have to verify and ultimately make my application viewed as spam.
EDIT: I was hoping an Instagram API expert could offer advice on this topic. My application has been continuously querying for posts without issue. So for now I'm sticking to having each user authenticate and call the API using their access_token. I may have given the wrong impression when I said the Instagram posts would be on a "widget". I didn't mean a simple Instagram feed on a website. So if anyone has used the Instagram API for large amounts of querying for their application, please share your approach if possible!
If the access_token is invalid, you will get an error response like this:
{"error_type":"OAuthAccessTokenException","code":400,"error_message":"The access_token provided is invalid."}
check for this and ask user to login again

Google+ api login

I am trying to create a site where you can login with Google+, but I am having some problems understanding the Google+ API.
Can anyone explain to me how to fetch information, such as e-mail, name, id, etc. or give me a good link for a site where I can find some documentation about this.
Before you suggest me to this site I have already read it but not finding out how to fetch info.
Google+ Sign-In provides users the ability to authorize your application to retrieve data from the Google APIs based on the scopes that you set for your button. When a user authorizes your app, the sign-in callback returns you an OAuth 2.0 access token. This token gives you the ability to queries any of the APIs that your scope granted access to, this is not limited to Google+ APIs. You pass your access tokens to the API when you make requests.
Basically, you read the prereqs and didn't continue reading the API docs for the lower level details specific to the API that you are interested in. In this case, it sounds like you want to retrieve a person's profile (A "Person resource") by using the people.get method. At the bottom of that page are code examples for a variety of languages.

Adwords API developer Token

Can I use Adwords API developer token for multiple applications? In more detail, say if I have a website where I am using adwords API developer token, Can I use the same token for another application. Ofcourse both applications accessing the same account after all.
Thanks,
Murali.
You can use the AdWords API across different applications with just one API token, just make sure though that you are caching the authentication response and re-using those tokens otherwise you'll hit the throttle limit. (Incidentally, logging in is possibly the slowest part of their API, so caching the response will speed up your application considerably)
No doubt you can use same development token for your multiple applications which are accessing same account. If your applications will access different account then it needs to get different developer token.
For the reference, you can read http://goo.gl/zLBPF
Hope it will help you.
Murali,
You need just one developer token, whether your application(s) access same account or different accounts (whether linked under the same MCC hierarchy or not). As a matter of fact, AdWords API Terms and Conditions explicitly prohibits you from getting more than one developer token.
If you use a developer token to make calls, you will be charged for API cost to the account holding the developer token. This is another reason why you should treat your developer token as a password and should reset it immediately if you expose it to the public by say, posting it publicly on a forum.
I also wish to point out that the official AdWords API forum is http://groups.google.com/group/adwords-api, you can ask your questions there and someone will answer your questions in a day or two.
Cheers,
Anash
Yes, Adwords even has channels that you can create to separate your ad campaigns
Adword Docs - Campaigns