cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

Post a tweet' failing with a '401' - 'Unauthorized' error message

Hi folks trying to get a flow to run I've got this error

 

status401.JPG

 

 

The good is that I'm learning a lot about error messages a/o statuses. The bad is *really hard*¨to get a simple flow running smoothly for a while.

 

J

21 REPLIES 21
Microsoft
Microsoft

Hi jlocatell,

 

I created a similar flow, When a tweet is posted -> post a new tweet,

I run successfully once, and it fails multiple times, but it's because I'm out of call volume quota(maybe it's trottling by twitter), could you try another key word?

tweet-tweet.pngtweet-tweet-error.png

Microsoft
Microsoft

 

I've dealed already with the quota issue wondering why flow is not able of manage the API use in order of not to excess the famed quota.

 

that error is 403 this one is 401. Pears and apples of the same farm.

 

J

Hi @jlocatell Have you checked your connections? Re-authorizing them will fix the issue, in case they are broken.

 

Thanks,

Sunay

Today I've got the 401 error again.

 

To check a connection means to delete and recreate it?

 

J

@jlocatell : No, you shouldn't have to recreate the connection.

What do you see on the my connections page.

https://flow.microsoft.com/manage/connections ?

Yes, try it. if it fails again, there might be a problem with our connector, we would fix it.

 

Thanks

Regular Visitor

Bumping this up again as it is still an unresloved issue.

 

I get this with every flow I create - RSS to Twitter. Twitter connection created *during a flow creation* will get ONE successful post of a tweet before all subsequent attempts to use that connection by the same flow or others that use it fail.

 

{ "status": 401, "message": "Unauthorized", "source": "127.0.0.1" }

 

I have not tested yet but I have a suspicion: does anyone else having this issue have 2FA turned ON for the target Twitter account?

 

I'm turning off 2FA today temporarily to test the theory.

 

UPDATE

 

2FA theory tested and disproven. Regardless of whether 2FA is turned on for the target account, a connection to Twitter only appears to work ONCE, and then only if that connection was created during the creation of a Flow. If you create the connection first and try to use it in a new or existing Flow, it doesn't even give you one successful one.

Hi @CheekyTaurus,

 

Can you navigate to the flow runs page of the failing flow and paste the url here?

 

This will give me the flow identifier so that I can investigate further.

 

 

Thanks!

 

-Travis

Hi @CheekyTaurus,

 

We can see that the authorization error is coming from Twitter itself.

 

Can you please navigate to 

https://twitter.com/settings/applications

 

and see if "Microsoft Powerapps and Flow" is in the list of approved applications?

 

Capture.PNG

 

 

 

 

 

It is. I think I tried revoking and re-authing once, but I'll try it again.

Hey @TravisB

 

I checked the flows again this morning after reovking access on twitter.com then recreating the connection and reauthorizing.

 

All flows are still failing.

Hi @CheekyTaurus,

 

Thank you for your help in debugging this!

Quick update: you're definitely not alone in this, but you are the first to bring it to our attention. Thanks for that!

 

It looks like about 1 percent of Twitter users are facing this issue, which is significant. We're currently in investigation as to a fix.

 

We appreciate your patience, I'll bump this thread as I get updates.

Regular Visitor

Thanks Travis!

Hi @CheekyTaurus,

 

We've narrowed this down to an encoding issue.

 

I don't think there's anything wrong with your connection (can you verify it shows as "Connected" on the connections page?). I think the flow is just failing with a very deceptive error message.

 

What's happening reliably is a strange behavior of the Twitter api where if you send a tweet with both non-ascii encoded characters (generally non-English characters) and ascii characters that need to be encoded (generally non-alphabet characters), the twitter api is returning a "Not Authorized" status.

 

Eg:

漢字 - works

漢字.. - works 

漢字) - does not work (The ')' needs to be url encoded)

aa) - works

 

This explains why your flow would work occassionally once: you'd happen to get one English message out of your rss feed.

 

We're in investigation as to a fix. I'll continue to bump this thread with updates.

 

Best,

Travis

Hi @CheekyTaurus,

 

A fix has been made and is currently in the middle of deployment train to all regions. It may take a couple days to hit yours, but after a couple days (if not already) the issue should resolve itself for you. If it doesn't, please let us know.

 

Thanks again for reporting the issue!

 

-Travis

@TravisB fantastic news! I'll keep any eye out. Thanks for the update!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,498)