gitroomhq / postiz-app

šŸ“Ø Schedule social media posts, measure them, exchange with other members and get a lot of help from AI šŸš€
https://postiz.com
Apache License 2.0
9.72k stars 2.21k forks source link

Postiz API #350

Open jamesread opened 3 weeks ago

jamesread commented 3 weeks ago

šŸ”– Feature description

A simple RESTful API, where users can authenticate and make posts would be very welcome.

šŸŽ¤ Why is this feature needed ?

Many people would like to use a Postiz API to run automations and scripts.

āœŒļø How do you aim to achieve this?

The backend itself basically is the API, but it's not well documented for general API usage - it's only used by the frontend, and it's fairly tightly coupled with the frontend as well.

It is likely that the community would want to build connectors or Postiz, for popular automation apps like n8n, or even something like Apprise.

šŸ”„ļø Additional Information

This has been suggested in the Discord chat.

šŸ‘€ Have you spent some time to check if this feature request has been raised before?

Are you willing to submit PR?

None

coder-pink commented 3 weeks ago

@jamesread Hi, Can you assign this to me?

jamesread commented 2 weeks ago

Hey @coder-pink , this needs a full design really before we go ahead and implement it. @nevo-david and I probably need to sit down together and work out what makes sense before we can open this up for contribution.

However, feel free to stare any design ideas that you might have here, and when we're ready, we'll make sure to include you!

coder-pink commented 2 weeks ago

Hey @coder-pink , this needs a full design really before we go ahead and implement it. @nevo-david and I probably need to sit down together and work out what makes sense before we can open this up for contribution.

However, feel free to stare any design ideas that you might have here, and when we're ready, we'll make sure to include you!

Hi @jamesread @nevo-david, Thanks for the updates, I completely understand the need for the design before implementation. Iā€™m more than happy to wait for you both to discuss the best approach. I have some ideas for the RESTful API, particularly regarding the authentication method and necessary endpoints.

Authentication Method:
For Authentication, we can implement both OAuth 2 and JWT for secure authentication and token access. However, if we don't want the involvement of a third party, we could focus on JWT authentication. This approach simplifies user management and makes it easy to issue and validate tokens for user sessions.

I can provide more details on the endpoints we might need once we have a clearer direction on the overall design.

Looking forward to hearing your thoughts!

jamesread commented 1 week ago

Hey @coder-pink , I think there is a discussion about whether this lands in the public project, or is a feature that only exists for the paid-for platform version. I haven't caught up with @nevo-david about this in a while so I'd need to do that to know where we're going.

At the moment Postz supports auth with the backend API, using local users as well as OAuth2 - so we'd probably just re-use the existing auth methods.

coder-pink commented 1 week ago

Hi @jamesread, Thanks for the update! Iā€™d love to contribute to any other issues or tasks that might be available. Are there any issues that I can work on?

jamesread commented 1 week ago

Hey @coder-pink , check out https://github.com/gitroomhq/postiz-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

RRoundTable commented 3 days ago

I attempted to use the Postiz backend API from n8n, but found it challenging due to its tight coupling with the frontend. If the API could be made more accessible for backend use, I believe it would significantly increase Postiz's potential for integration with various automation tools, driving much wider adoption.

While I'm not familiar enough with Next.js to make direct contributions, Iā€™d be glad to provide feedback from an n8n user's perspective.

timoa commented 1 day ago

Agree! One thing I loved about Buffer (as a paid user) was the browser extension that allows you to collect articles you want to share on multiple social networks.Ā  If you go with the pay-for platform, you will limit the automation and additional "channels" that your API will allow (browser extension, connection to other social media tools, N8N/Zapier/Make, etc.). I would be more than happy to contribute to N8N node or browser extension if we have an API to use šŸ˜