Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What am I doing wrong? #8

Open
quackduck opened this issue Dec 25, 2024 · 11 comments
Open

What am I doing wrong? #8

quackduck opened this issue Dec 25, 2024 · 11 comments

Comments

@quackduck
Copy link

$ xurl auth oauth1 --consumer-key IiXX...iaYNBP --consumer-secret Rvl9RQl...VJnayU --access-token 106560...u975UixF3YUO7b --token-secret eFVeG...whV5k9jDXX
OAuth1 credentials saved successfully!
$ xurl auth status
OAuth2 Accounts:
OAuth1: Configured
$ xurl --auth oauth1 /2/tweets
{
  "detail": "Unauthorized",
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}
@santiagomed
Copy link
Collaborator

Can you try /2/tweets/:id ?

@quackduck
Copy link
Author

same thing

$ xurl --auth oauth1 /2/tweets/:id
{
  "detail": "Unauthorized",
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}

@quackduck
Copy link
Author

quackduck commented Dec 26, 2024

I just regenned and tried adding in my keys and secrets again. No change. Something I'm confused about: at no point have I had to enter the Bearer Token. Is this expected?
image

@santiagomed
Copy link
Collaborator

You want an actual post id instead of :id. For example /2/tweets/20

@quackduck
Copy link
Author

Same thing

xurl --auth oauth1 /2/tweets/20
{
  "detail": "Unauthorized",
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}

@santiagomed
Copy link
Collaborator

Oh I think you are right, /2/tweets/:id only support App-only auth which is through the bearer token. App auth support will be included in the next release.

@quackduck
Copy link
Author

ah okay when can i expect that? also what's a good endpoint to test out user point of view api access? thanks for your help!

@santiagomed
Copy link
Collaborator

santiagomed commented Dec 31, 2024

The release is live! You can update xurl by running the install command again

also what's a good endpoint to test out user point of view api access?

what do you mean? timelines?

@shanlalit
Copy link

@santiagomed I have the same issue.

FYI: We want to use App auth, we have an in-house tool to post on our X.com account (we are subscriber), majorly media tweets.

Just a while ago, I installed the xurl. Here are my output. Please help.

$  xurl auth oauth1 --consumer-key "HFnsXXX" --consumer-secret "8XX7Lkmxxx" --access-token "96835xxx" --token-secret "Zdqwxxx"
OAuth1 credentials saved successfully!

$ xurl auth status
OAuth2 Accounts:
OAuth1: Configured
App Auth: Not configured

$ xurl /2/users/me                                                           
{                                                                              
  "detail": "Unauthorized",                                                    
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}

xurl --auth oauth1 /2/tweets
{
  "detail": "Unauthorized",
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}

@santiagomed
Copy link
Collaborator

There seems to be a bug with Oauth1, I will look into it

@santiagomed
Copy link
Collaborator

Please update and try now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants