Expanding the Twitter Auth extension

Options
Using the two endpoints in the new twitter auth extension, you can get the auth token to use in future calls to the twitter API and take action on a user's behalf (like posting tweets).
[image.png]
Those other API calls are about as complex as the ones constructed in these GET calls. The simplest way would be to duplicate these endpoints and revise them to use the auth token and authenticate the next call.

[image.png]
I'm wondering if anyone knows what needs to be revised to do so?

I took a stab at it. It's the endpoint "/2/tweets" in this snippet: https://www.xano.com/snippet/2d_M-7Ek

I am following the auth request instructions here: https://developer.twitter.com/en/docs/authentication/oauth-1-0a/authorizing-a-request

And trying the basic get timeline call: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-home_timeline

I run through the first two endpoints, which saves an oauth_token to the user database. I take that and use it in the parameter in the new endpoint I made, but still get this error:

code: 
ERROR_CODE_ACCESS_DENIED,

message: 
Could not authenticate you.

Comments

  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
     come to office hours and we can take a look. This Twitter OAuth stuff is too complex to go through over the forum. I wish it was easier but I'm having trouble following and I did the first version! 😂
  • Jay
    Jay Member
    Options
     I basically posted this in preparation for office hours. I'll explain then, but essentially, I'm trying to figure out the construction of any "user authenticated" call you would do once you got the auth token from the 2 auth calls you built.