I'm trying to create something where people log in and I check to make sure they are following us on Twitter before they can register for something.
But I'm seeing that Twitter's API only allows 15 requests every 15 minutes.... for this endpoint... what in the world!?
Source
Is there another API endpoint to achieve what I want to do, or any ideas to workaround/work with this to still achieve what I want? Again, trying to make sure people are following our account before they can register for something.
With this limit, if 20 people register within 15 minutes, it won't work... that seems extremely limiting....
Related
I'm trying to figure out how I can implement a retry policy in a Twilio Studio Flow. I see that they have an example, but it only has a delay of no more then 10-seconds.
I want something that can use to retry when my webhooks service is down. I did setup the sample from the Twilio docs but it only seems to work when you want a delay of no more then 10-seconds. But I need it to pause for an hour or two. So say the HTTP Post step fails because the webhooks service is offline, I want it to pause for an hour and try again. Then pause for 2, then 3, then 4, etc. and try again. The point being, I don't want to lose the user's response.
What I am trying to do is not lose any of the user responses from a survey if my webhooks application goes down. We saw this happen in production for a couple of hours and we lost survey response from 200 users.
If this is not possible, is there a way I can reach back out to Twilio logs and get access to the responses that failed while the webhooks service was down? I recall running into something where you can pull back the logs, which could then be used to identify the ones that failed.
This kind of logic isn't really built into Studio. Ten second waits are typically the most you will see due to both Twilio Functions & the http request widget timing out at this point.
If you wish to include this kind of wait then you will need some sort of workaround where you go into a send & wait for reply widget (which ignores responses from your customers with some additional logic) and has a timeout set to the amount of time you want to wait. You can then transition to the webhook request again and re-attempt.
Alternatively, you can create a utility which uses the Execution resource to find all the failed flows for a given time period so you can choose how best to move forward.
When establishing a call using Twilio, many many POSTs are made to https://eventgw.twilio.com/v2/EndpointMetrics, and I've noticed in our javascript error tracking service that some of our users get 403s from these calls. In the last week, there have been 19 users getting 2,600 errors. Can anyone from Twilio tell me what the calls are, whether these errors are benign and I should ignore them, and whether there is any way to disable these? For a single short call I'm seeing 34 separate POST requests to this endpoint.
Can you check that when you get these errors, your clients Access or Capability token didn't expire?
I have coded a Fine bot which Tweets every 150 seconds time.sleep(150) . I have made a APP from twitter with Read / Write Permissions . But after 30 Tweets, Twitter Blocks the Application. So is there any way to Bypass it. ? Or has someone ever Tried bots in Twitter. Their are some grammar Bots, RT's Bot in twitter which has almost 110k Tweets and they tweet every 30 seconds .. How do they bypass the Frame Limit Protection
Specific Error Restricted from performing write actions and Code Stops.
The docs at least don't specify the rate limit rules, only that there's one. But it does state that you can not have duplicate texts. Is that the case possibly? What HTTP Error are you receiving? Since they don't explicitely post the rules that apply to the rate limit, I'd suppose they might have internal algorithms to tell if it's bot-like behaviour, which I'm sure they do not want to allow. Especially if you set up a new app, regulations might be more strict.
Edit:
If you're completely certain that you're not firing up too many requests at once (e.g. check with fiddler to make sure), then twitter suggests to get in touch and check the email address of the associated account for any mail from the operations team in order to resolve possible misinterpretations.
This also might be useful: API developers: abuse prevention and security
I faced the exact same problem with my twitter bot. I basically made a bot to auto-reply to a specific user and ran that script on cron of 1 minute. Got blocked even though my replies weren't spam but AI generated replies from https://qnamaker.ai/
My script is a bit heavy so it is not feasible for me to keep it running 24*7 as it'll create overhead on server system. But since you keep running it(picked that up because of the delay function), one thing you can do is keep changing the time interval in which your bot makes a tweet. Make it random so that it doesn't look scheduled and bot-like.
You can use the random class in python for that.
import random
y=random.randint(100,150)
time.sleep(y)
This way your code resumes after random intervals of time. This prevented my bot from getting blocked for a long time. Hope this helps.
Your bot seems to be banned, their algorithms probably flaged your posting as similar to spam accounts.
You should contact Twitter and explain the situation, using the following page:
Twitter API Policy Support, give them the details of why they should allow your bot to act as you wish.
I use iOS Facebook SDK 3.1. I am using FBSession's openActiveSessionWithReadPermissions:allowLoginUI:completionHandler: to connect the user to Facebook. After the user is connected, is there way to synchronously get the logged in user's UID? I am aware I can asynchronously get the UID with FBRequestConnection's startForMeWithCompletionHandler:, but the asynchronousness complicates my flow and the extra HTTP request seems wasted to get something as simple as the UID.
the asyncronousness complicates my flow
It's usually easier for the programmer to do things synchronously, but its usually better for the user to do things asynchronously.
the extra HTTP request seems wasted to get something as simple as the UID
How long will that request take? 100 milliseconds? 1 second? 10 seconds? Answer: you have no way of knowing how long it'll take, and it could easily be 10 seconds or more in some cases. Do you really want to freeze your app for that long because you're too lazy to do things the right way? What will your users think? Do you care?
I have a Twitter app that works fantastic locally - it searches for keywords then for each user it grabs their info using Hpricot to parse the xml e.g.
Hpricot(open("http://twitter.com/users/show/"+myuser+".xml"))
Works fine locally but when I go love it fails. Looking at my log I get this error:
OpenURI::HTTPError (400 Bad Request):
The weird thing is though, sometimes it works.
This has been a recurring problem for a few days now and driving me nuts. Will hug anyone with a solution :)
It's almost definitely rate-limiting - http://apiwiki.twitter.com/HTTP-Response-Codes-and-Errors . Haven't seen 400s returned for anything other than rate limit before, though the docs say there could be an accompanying message that tells you more exactly what's wrong.
You might be able to get whitelisted for more queries, see http://twitter.com/help/request_whitelisting .
You are probably making too many requests. You are allowed to make 150 REST API calls per hour unauthenticated.
REST API Rate Limiting
Unauthenticated calls are permitted 150 requests per hour. Unauthenticated calls are measured against the public facing IP of the server or device making the request.
OAuth calls are permitted 350 requests per hour and are measured against the oauth_token used in the request.