youtube api v3 credentials expire after 1 hour during upload (objective-c)? - objective-c

My upload stopped after 1 hour due to invalid credential. Should I call authorizeRequest on the tickets manually before token expiry? Or is there any better solution?

I suppose the video is quite big enough because it's taking more than 1 hour, and I recommend resumable upload for it.
http://www.youtube.com/watch?v=gzXWnuzxNDQ
https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol
Unfortunately we can't extend epiration term of OAuth2.0 credentials, so as you say, you have to refresh your credentials with your refresh token.

This 1-hour limitation is a known issue in our side. You can follow this issue tracker ticket to get notified when it's fixed.
https://code.google.com/p/gdata-issues/issues/detail?id=5124

Related

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

Instagram API Rate Limiting - Signed POST calls - still being treated like unsigned calls

Instagram changed the way it rate limits like, comment and relationship endpoints in its API recently...you can sign API POST requests with an HMAC hash of your client secret and app IP address. I am doing this successfully. I know this because I get a 403 error message if I don't include the a properly hashed X-Insta-Forwarded-For header; get a 200 success message if it is included).
Still, I'm being rate-limited to 30 "like" calls per hour (the limit for unsigned requests); 100 is the limit for signed requests. Anyone know why this might be?
Updated docs are here: http://instagram.com/developer/restrict-api-requests/
and
here: http://instagram.com/developer/limits/
Apparently my Instagram client credentials had been flagged by Instagram, and they were limiting me based on past behavior of my app. I registered a new client with Instagram here: http://instagram.com/developer/clients/manage/, re-authenticated with the new app, plugged the new secret into my code to sign my requests, and I was able to like 100 IG posts within an hour. Good to go!
I faced the same problem and I managed to solve it by simply revoking app token from user panel. No need to create new app.

LiqtoTwitter Authorization Automation

is it ever possible to authorize twitter app on the desktop without user input (of the seven digit number)?
I am trying to develop a realtime tweet fetching application between a list of friends/followers "suspects" communicating together. But the authorization code that needs to reset after 15 mins is an issue, so unless someone if manually present to handle re authorization after a couple of mins is a serious challenging. Is there a solution to my question.
Joe Mayo or any one, pls help here.
Thanks
There are two different issues at work here: authorization and 15 minute rate limit windows. For authorization, you receive OAuthToken and AccessToken, accessible via IAuthorizer.Credentials after the user authorizes. These tokens never expire. So, you save them when the user first authorizes and then load them into IAuthorizer.Credentials and you won't need to perform authorization again. Here's a more detailed description:
linqtotwitter - grab the saved credentials
Since you mentioned something about "reset after 15 mins", I assume you're referring to Rate Limits, which are set in 15 minute windows. Here's a recent discussion:
How to handle LinqtoTwitter Rate(v2.1) limit exceeded Error
It would be helpful to review the Twitter docs on Rate Limiting.

Calling Yahoo API through OAuth

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.

Instagram API Error: Client request limit reached

I am getting this error whenever I try to follow someone on Instagram via API no matter how many follows have been done before:
{"meta":{"error_type":"APIError","code":400,"error_message":"Client request limit reached"}}
My app allows authenticated users to follow interesting people. I know that there is a 5000 call/hour limit per authenticated user, but it fails even with new users.
Do my app is reaching some kind of client level limit?
APIs like follow, unfollow, comment are limited to 350 requests per hour. However sending requests from client side will fix this problem to some extent but it allows the users to see your API token.
In this case it looks like it would be beneficial to get some more data from your users. You could use Google analytics to track the "follow" action
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
This would give you a timestamp and information about user behavior.
Even with an advertised rate of X requests per hour, one user hammering the service with your API key can cause everyone to get throttled. (Not guaranteed, but pretty common practice for companies to keep their services alive)
It might be a good idea to reset your API, its possible (though unlikely) that someone has acquired your key and is using it.