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

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.

Related

Should I use a custom JWT claim or query the db for authorization?

Let's say I have build a REST API for an application like WhatsApp and I got an endpoint like POST chats/groups/{group-id}/messages which adds a new chat message from my requestBody (This is just an example).
Before my API allow this request, it has to ensure that the request comes from a group member. So with that, I want to make sure that only group members are allowed to post new messages.
Since I didn't want to query the database for group membership, everytime I post a message to the group, I thought about adding custom claims to the JWT.
Could look like this
{
...
"groupMemberships": ["Some fancy UUID", "This one is a fancy UUID as well"],
...
}
With that I always could compare if the requester contains the target group in it's groupMembership array via the UUID. Sounds fine until now...
But what happens when the user is kicked out from the group ? Since the JWT is valid for e.g. 2 weeks, the requester could still send messages to the group, which is creepy and weird at the same time. A possible solution could be to blacklist the JWT but that's not really what I want, since that steals the stateless characteristic and lets me hit the DB anyway.
How could someone solve this problem ? Is it maybe okay to query the db for membership checks ?
One risk with your approach is that for some users the token might be quite big (what if you are part of many groups?). In general you want to keep your tokens small.
Another option is o let the API that receives the access token, do a lookup against your database as this is part of the authorization phase. By doing this, you can have long lived access tokens and the user can change groups as you like.
Alternatively, if you do add the claim to the token, you can then make the access token short lived, like 5 minutes, and have a long lived refresh token to renew and update the claims in the access token.

Does the docusign base uri change for a specific user?

Does the docusign base uri change for a specific user? Can I fetch it just once in my application and use it for all subsequent docusign API calls? Also can we use same access token for multiple API calls until it expires after an hour?
Base URIs may change when calling different accounts. All users on the same account will have the same base URI, but keep in mind that some users are members of multiple accounts.
In practice, yes, you can fetch the base URI once and use it for all subsequent API calls against the same account.
Yes, tokens generated through the JWT Grant workflow last for an hour and should be reused whenever possible. As a best practice, consider requesting a token at around 50 minutes into the hour so that you have a brief window of overlap to ensure a smooth transition.

How Often Instagram Access Token Expire?

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).

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.

For how long is a Stripe card token valid?

For approximately how long is a Stripe card token (aquired through Stripe.js) valid? According to the docs:
The token is single-use only and has a short life. Use it in an API
call immediately.
I understand I shouldn't store the token for use later, but how short is "short" in this case? Should I expect it to expire within seconds or minutes?
(Although not relevant to the question itself, the reason I'm asking is that I would like to take the token exchange step out of the transaction that the user is waiting for, and let a background job handle the actual Stripe integration. Obviously, that's not a good idea if the token has a very short lifetime.)
The card token is valid for a few minutes (usually up to 10). What Stripe recommends in that case is to use the token now to create a customer via the API first to save its card and then let your background job handle the charge part after the fact.
This also ensures that the card is valid as Stripe runs a $0/$1 authorization on the card first. You can then give feedback to the customer immediately in case of an error.

Resources