Skip to content

Feat: Post on a specific community  #13

Open

Description

@developeratul

Yoo first of all, love content report! And congrats on making it open source.

So I have a feature request.

On Twitter, I can post a tweet on a specific community (audience selection) but on content report, I can only post it directly on my feed not on a specific community.

Screenshot_20250725-211737.png

This is crucial for small accounts like me who don't get any reach posting on my feed (I don't get reach either ways lol). So is that something we can work on?

If you guys approve, I can implement 🤝

Activity

  1. developeratul commented on Jul 26, 2025

    @developeratul
    Author

    @joschan21 what do you think?

  2. joschan21 commented on Jul 28, 2025

    @joschan21
    Owner

    love the idea. wasn't familiar with the concept at all before but would love to have this on, this will help others too.

    let's find a nice way to put this into the ui, more than happy to review & merge your PR!

  3. developeratul commented on Jul 29, 2025

    @developeratul
    Author

    Cool! I'm gonna start working on this. Will propose UI and solutions here for you to review. If that's okay?

  4. jcodog commented on Aug 2, 2025

    @jcodog
    Collaborator

    Any update on getting this working? It honestly is a fire suggestion that makes sense for growing accounts. And I would love being able to schedule a post to send to a specific community with daily updates on project progress etc.

    What sort of account access authorizations would contentport need to be able to use this, especially with the api prices being what they are.

  5. developeratul commented on Aug 2, 2025

    @developeratul
    Author

    @jcodog Haven't started implementing yet. still figuring out the API part. as I don't have the premium API, could not test out what could work yet. Did you find any endpoint that would let me fetch all the communities the user is part of? These are the potential endpoints so far:

    1. https://docs.x.com/x-api/lists/get-followed-lists
    2. https://docs.x.com/x-api/lists/get-list-memberships#get-list-memberships
  6. developeratul commented on Aug 2, 2025

    @developeratul
    Author

    I see typefully implemented this very well. need to see what API endpoint they are hitting

  7. jcodog commented on Aug 2, 2025

    @jcodog
    Collaborator

    I think endpoint 2 is better, but just ask Grok. It is very good at understanding the 𝕏 api to work with it. One of the only ways I've used Grok tbh.

  8. developeratul commented on Aug 9, 2025

    @developeratul
    Author

    This is what I found after talking to GPT-5. Summary is, we can manually copy the community id from the URL and put it in the community id field in the API request. so that might require a input field in the UI. other way is to apply for elevated x api access.


    1. Current State of X API for Communities

    • Public API docs: There is no official GET /communities endpoint to list joined communities.
    • Private/Partner API: Internal endpoints exist, such as:
      GET /2/communities/list
      GET /2/communities/:id
      POST /2/tweets?community_id=...
      
      but these are not available unless your app is whitelisted.
    • Posting to a community requires a community_id parameter in the tweet creation request.

    2. How Developers Currently Work Around This

    Option A — Manual Discovery

    1. Go to the X web app.
    2. Open the community you want to post in.
    3. Look at the URL:
      https://x.com/i/communities/1234567890123456789
      
      The long number is the community_id.
    4. Store these IDs manually for your app.

    Option B — Using the Private API (Unofficial)

    If you inspect network requests in your browser while visiting the Communities tab, you will see calls like:
    GET https://api.x.com/2/communities/list?user_id=YOUR_USER_ID
    This returns JSON with all joined communities.
    However:

    • This requires your user OAuth token from the web session.
    • It is against X's Developer Policy to use undocumented endpoints in production without permission.
    • It can break anytime.

    3. Posting a Tweet to a Specific Community

    Once you have the community_id, you can use the Tweet Create endpoint with an extra parameter.

    Example (v2 API, OAuth 2.0 with tweet.write scope):
    bash curl -X POST "https://api.x.com/2/tweets" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "text": "Hello community members!", "community_id": "1234567890123456789" }'

    Notes:

    • community_id is required for community posts.
    • Your app must have permission to post in that community.
    • If you try without access, you will get an error like:
      {"errors":[{"message":"You are not a member of this community"}]}
      

    4. Recommendation

    If you want to programmatically list communities and post to them:

    • Apply for X API Partner Access and request Communities API permission.
    • Until then, manually store community_id values for the communities you want to post in.

    Summary:
    Currently, there is no public API to list joined communities. You either manually collect community_id values or use private endpoints (not recommended for production). Posting to a community is possible if you have the ID and the right permissions.

  9. developeratul commented on Aug 9, 2025

    @developeratul
    Author

    @joschan21 how will you proceed?

  10. mluev commented on Sep 23, 2025

    @mluev

    Hi guys! Would love to hear any updates on this feature, because it would be really cool feature for me and a lot of other users! If you need any help on implementing I'm also happy to contribute!

  11. jomeerkatz commented on Nov 28, 2025

    @jomeerkatz
    Collaborator

    It’s been a while since this was discussed, but I’d like to pick it up now.
    Who would be interested in helping me implement this feature?

  12. jcodog commented on Nov 28, 2025

    @jcodog
    Collaborator

    I am happy to work on this with you, but what access to the x api does contentport have? Do we have access to the endpoints that are needed to list and post to said communities? These are all the questions that need answers before this can progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions