How Often Instagram Access Token Expire? - instagram

There are many answers on this question but I did not get correct one.
I have integrated Instagram API to my application, and API call are on the basis on Access Token.
What If the Access Token Expire? Is there any solution to handle this problem?
Becaues this will stop working Insta feeds from my website and throw error.
Need help, suggestion, support, and solution!
Thanks in advance!

Instagram doesn't say anything solid in it's documentation:
Access tokens may expire at any time in the future.
In my experience the time varies broadly, even for the same app.
First token I obtained worked for about a year. The next one expired in two months. Third one lasted for two weeks (all for the same account and same application).

Related

Gmail API Oauth Approval been waiting almost 3 months

I have an application which has the ability to link to a Gmail account via OAuth for a client and send email from the system. I have created the OAuth authorization with Google almost 3 months ago. I received 2 emails from them over that time 1 was resolved within an hour the other was requesting a video which was already included in the original request.
Is google always this slow? I have called cloud support and did not receive any help. Anyone else had to wait months to get OAuth authorization from google?
Facebook and Microsoft were within a day.
Tried calling them cloud support (no help). Send them feedback on the OAuth console page. No reply. Replied to the email they sent a request for more information on but that was over 6 weeks ago no reply. I am trying to get access to send an email. This has to be one of the most common use cases with Gmail. Does not make sense that it is taking so long.
N/A. It is a web application using Gmail oauth2
The first few communications with google regarding verification went relatively quickly with 1-5 day response times. These were the "obvious error" ones. Once we resolved those, we received this on Mar 29:
Thank you for submitting an OAuth App Verification request. We
appreciate your patience during this review period.
The app verification process can take several weeks to complete.
Google will not take action against apps for non-compliance with the
new policy during the verification process if you are acting in good
faith to come into compliance. User access to your app for existing
approved scopes will not be impacted. All apps that have applied are
expected to fully complete the app verification process by May 15,
2019, with the remainder of 2019 to complete the security assessment.
So that is a suggested 6 week timeframe.
Have you received a similar email?
Also note: If your app is not currently available for public use ( or in development ), you can request to skip the verification process.
https://support.google.com/cloud/answer/9110914#skip
This has to be one of the most common use cases with Gmail. Does not
make sense that it is taking so long.
It might make sense in the context of the 2019 Restricted Scope security requirements and the level of chaos that is creating for developers, and therefor their support/verification team.
Based on FAQs, if your project contains multiple OAuth clients, Google needs videos demonstrating usage of restricted scopes for each of those clients. Failure to do so might be resulting in multiple communications. Removing unused clients from your project may help.
Email oauth-feedback#google.com and ask them for an update on your verification status.

Connect Google calendar api and api.ai

So here is what i am trying to do :
I built a bot with api.ai for my business that is hosted on my webpage and my Facebook page right now. Bot works well.
I want to push it to the next step by allowing my customers to make querys on my calendar, ask to book a specific time, see if available, if not offer other time similar, then make a booking.
I have been reading this thread and the great answer attached to it but i think my case is a bit different.
I was wondering if the bot could always have a token so every guests won't have to Auth to query the calendar ?
Obviously i am new to this, i have been reading the guide of google calendar api and api.ai but i don't really see how to do that yet. I guess there is a way to store a token somewhere and then just trigger the query with some specific intents but not to sure how.
I have also done the node.js quickstart guide of the G-calendar api, and it works fine if that helps.
Thanks for your help !
You will probably want to use a Service Account that is permitted to the calendar in question. Service Accounts are similar to regular accounts, but they are expected to do server-to-server communication only, so the method to create an auth token is a little different to keep it secure.
See https://developers.google.com/identity/protocols/OAuth2ServiceAccount for more information about using Service Accounts.
In general, you'll be using a shared secret to create and sign a JSON Web Token (JWT) you send to Google's servers. You'll get back an access token which you'll then use to call the Calendar API. The access token expires in about an hour, at which point you'll need to repeat the process.
There are libraries available to do much of this for you. For example, if you're using the node.js library https://github.com/google/google-api-nodejs-client, then it will take care of this for you (although you need to modify the key file - see the documentation for details).

How might we request for a new Instagram Access Token?

As I understand it, Instagram may expire our access tokens after an arbitrary period of time, in which case 'API responses will contain an “error_type=OAuthAccessTokenError”'.
Is the only way around this to get users to log in again?
I'm building an Instagram service which helps brands manage their following, and every day at a set time we request for their pictures and comments to run data analysis on engagement rates. Does that mean that we might arbitrarily lose access at any time and not be able to restart our service to our clients till they log in to authenticate again manually?
Any help with renewing Access Tokens would be appreciated!
You should verify if the initial grant included a refresh token in the authentication response. If not you may need to reauthenticate after expiration I think.

Does Instagram approve client apps that want to show an public hashtag feed on their website?

I am working at a agency that used to add Instagram hashtag & user feeds on websites. My old applications still work until june this year (https://www.instagram.com/developer/changelog/). Then they will need to be approved by Instagram to get out of sandbox mode.
I understand that we need an valid access token with: public_content permission scope. I read many people having their applications denied by Instagram.
When I read their permissions review (https://www.instagram.com/developer/review/) on the developer part of their site I came across this question:
My company is working with multiple clients, should I submit one app
per project? No, we do not approve apps that are created for one-off
projects (e.g. a hashtag campaign, an event, a website). You should
use a single client_id across all your integrations.
Do they approve applications that reuses its client_id for several projects? For example if I would want to develop an application/client which whole purpose would be to show one public instagram hashtag feed on websites. Would that get approved by Instagram if I reused the applications client_id over several projects?
Your use case is not approved. So your client will not get approved to "go live". You can still make these tag requests in Sandbox mode, but you will only get results from your last 20 posts. This short article explains how the Instagram API works since June 1st.
If you can work around the 20-post restriction, you can use this tool to manually generate an Instagram API token with the necessary public_content scope.
I don't think so.
I have requested public_info permission for an application simialr to yours but "DECLINED"
Try to request the permission with a good screencast video on how to use it and might be work. who knows.
Regards.

How to increase following limit per hour on Instagram? is there any other ways to following people more than its limit

How to increase following limit per hour on Instagram? is there any other ways to increase following peoples more than its limit.
Can we increase by using multiple application?
If you ask your users to log into their Instagram account, and authorize your app, then you can make 5000 requests per hour per user:
http://instagram.com/developer/limits/
If you just use your key, you are limited to 5000 requests per hour, no matter how many users you have.
But I'm worried, what if this token expires?
AFAIK, Instagram accesstokens don't expire currently.
Note: From Instagram documents.
Note that we do not include an expiry time. Our access_tokens have no explicit expiry, though your app should handle the case that either the user revokes access or we expire the token after some period of time. In this case, your response’s meta will contain an “error_type=OAuthAccessTokenError”. In other words: do do not assume your access_token is valid forever.
Should I authorize the app each time the token expires?
At the moment, you do not need to do that, as token does not expire. As and when the token expires in future, a corresponding warning or error code and message will be sent to you, which you need to handle.
what can I do to have my app always pulling data from account without
my participation?
You can try following:
Use sharedpreference to store the accesstoken.
First time when you try to fetch data that needs accesstoken(Authenticated requests), first check in the sharedpreference whether the accesstoken is stored or not.
if yes then you don't need to login, just use that accesstoken. If you don't have the accesstoken in preference then do the login using instagram credentials, get the accesstoken and then share it in shared preference and use that for subsequent requests.
You can provide instagram logout option in which you just need to clear the accesstoken from sharedprefernce.
Hope this is helpful to you.

Resources