postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

Postiz API

Open jamesread opened this issue 1 year ago • 10 comments

šŸ”– 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?

  • [X] I checked and didn't find similar issue

Are you willing to submit PR?

None

jamesread avatar Oct 10 '24 21:10 jamesread

@jamesread Hi, Can you assign this to me?

coder-pink avatar Oct 11 '24 05:10 coder-pink

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!

jamesread avatar Oct 12 '24 21:10 jamesread

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!

coder-pink avatar Oct 14 '24 08:10 coder-pink

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.

jamesread avatar Oct 21 '24 20:10 jamesread

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?

coder-pink avatar Oct 22 '24 05:10 coder-pink

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

jamesread avatar Oct 22 '24 08:10 jamesread

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.

RRoundTable avatar Oct 29 '24 05:10 RRoundTable

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 šŸ˜…

timoa avatar Oct 30 '24 20:10 timoa

Really looking forward to this!

samgabrail avatar Nov 01 '24 20:11 samgabrail

An API would be nice of course, I also would like that very much indeed - it would allow for some really powerful possibilities.

However, the founder of this projecto @nevo-david gets to make decisions, and he's probably keen to hear input. At the same time, he's invested hundreds, probably thousands of hours into the project, so how does he get reimbursed (financially) for that? A discussion in the open is good.

jamesread avatar Nov 01 '24 22:11 jamesread

Closing this, API has been implemented.

egelhaus avatar Jan 31 '25 21:01 egelhaus