sorry false alarm.
But i did find a workaround for now which i’m going to use in the interim.
Step 1) Link the user to the external twitter site for an authentication code:
https://mobile.twitter.com/i/oauth2/authorize?response_type=code&client_id=bGFYbkxxxxxxxxxxxxxxxxxxxxxxxxxx&redirect_uri=https://sampleredirecturl.com&scope=tweet.read%20users.read&state=state&code_challenge=challenge&code_challenge_method=plain
Step 2: you will need to create two API Connector endpoints. but before we do that, you’ll want an action that checks if the data in url for “state” is empty or not. This could be on page load or a “when a condition is true” trigger. for testing i tied it to the click of a second button.
Step 3: First API Connector, you want to create an API Connector which looks like the below:
Header has content type = “application/x-www-form-urlencoded”
Authorization: Bearer [“access token:access secret” encoded using Base64, can use this website:
https://www.base64decode.org/] this one was a bit tricky to figure out, be sure to encode your access_token:access_secret together with the colon in between
Data Type is Json, but you don’t format it as json format is like this:
“code=<auth_code>&grant_type=code_received_as_state_from_external_url&client_id=bGFYbkxxxxxxxxxxxxxxxxxxxxxxxxxx&redirect_uri=<redirect_uri>&code_verifier=challenge”
Make sure your redirect_uri exactly matches the one you fed the external site or it will throw n error. The authorization code is the code you received from the prior external url call returned as “state” in the html parms.
If you are lucky to get this working, response should look something like this:
{
“token_type”: “bearer”,
“expires_in”: 7200,
“access_token”: “TGJjMFlmMG5fOTFLUC0zTEhwZHR3X2d1TVBLMFlaUXhxMngwYTgwRHBfZVR3OjE2OTkxxxxxxxxxxxxxxxxxx”,
“scope”: “users.read tweet.read”
}
The “access_token” above is the oauth code you need to pass for the actual API calls.
so for example my step 3:
Step 3) call to get “me” data
To get additional info you need to tell it which fields you want. i ask for the following:
https://api.twitter.com/2/users/me?user.fields=description,profile_image_url,url,public_metrics
You need to pass your oauth token in the header as
Authorization: Bearer [oath_access_token]
If this works, response should look like this! I know this doesn’t log the user in for you but it works for my purposes. To get the email is a bit more cumbersome but this should give a big header start in that direction hopefully. good luck everyone.
{
“data”: {
“description”: “Founder of http://one2all.io. Speedrunning web3 at 10x, building 50+ killer apps and counting. http://one2all.io http://x.com/one2all_io http://discord.gg/J6r6fUAVfe”,
“username”: “theahchu”,
“id”: “60993240”,
“profile_image_url”: “https://pbs.twimg.com/profile_images/1682644164083847168/s443vj9B_normal.png”,
“name”: “chusla”,
“public_metrics”: {
“followers_count”: 430,
“following_count”: 325,
“tweet_count”: 849,
“listed_count”: 12,
“like_count”: 395
},
“url”: “http://www.medium.com/quality-works”
}
}
PS - @laura.oppenheimer many folks are frustrated that this is now broken, hopefully my walkthrough above can help the team further troubleshoot and find a solution.