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

403 (forbidden) response #598

Closed
ReenigneArcher opened this issue Jul 25, 2024 · 5 comments
Closed

403 (forbidden) response #598

ReenigneArcher opened this issue Jul 25, 2024 · 5 comments

Comments

@ReenigneArcher
Copy link

I get a 403 response when trying to use this action.

> Run nearform-actions/github-action-notify-twitter@v1
  with:
    message: https://github.com/LizardByte/plexhints/releases/tag/v2024.725.1918
    twitter-app-key: ***
    twitter-app-secret: ***
    twitter-access-token: ***
    twitter-access-token-secret: ***

  *** ACTION RUN - START ***
  
Twitter message: https://github.com/LizardByte/plexhints/releases/tag/v2024.725.1918
Error: Action failed with error. Error: Request failed with code 403 [object Object]

      *** ACTION RUN - END ***
      

I have regenerated all keys, tokens, etc and the result is the same. I am not hitting any API rate limits as I almost never used the API, and haven't used it in the past several months. Any ideas?

@ReenigneArcher
Copy link
Author

ReenigneArcher commented Jul 26, 2024

Is it possible it's failing because the message is strictly a url? I know this used to work, but it's been a while since I've used it.

Edit: It's not because it's a URL. https://github.com/LizardByte/.github/actions/runs/10104499754/job/27943571270#step:2:3

@ReenigneArcher
Copy link
Author

I found the issue by using noweh/[email protected]

data: {
    client_id: '***',
    detail: 'When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.',
    registration_url: 'https://developer.twitter.com/en/docs/projects/overview',
    title: 'Client Forbidden',
    required_enrollment: 'Appropriate Level of API Access',
    reason: 'client-not-enrolled',
    type: 'https://api.twitter.com/2/problems/client-forbidden'
  }

My app was not "assigned" to any "project".

@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
@simoneb
Copy link
Contributor

simoneb commented Jul 26, 2024

@ReenigneArcher I'm not sure if there's anything to be done here, as we're not currently using this action there may be a change in the twitter API that we may have missed. Can you help me understand what that may be?

@ReenigneArcher
Copy link
Author

The issue was simply that my app in twitter was not associated to my project in twitter.

I think logging the response when there's an error could be helpful like the other action does. This helped me immediately identify the issue.

@simoneb
Copy link
Contributor

simoneb commented Jul 29, 2024

Understood, thanks for clairfying 👌

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

2 participants