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

Feedback for “Public API” #60

Open
nmbgeek opened this issue Feb 15, 2025 · 3 comments
Open

Feedback for “Public API” #60

nmbgeek opened this issue Feb 15, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@nmbgeek
Copy link

nmbgeek commented Feb 15, 2025

Can this be expanded? I am trying to use the API and not having luck getting a simple Facebook post to be added.
Response when I try: {"message":["shortLink should not be null or undefined","shortLink must be a boolean value","tags should not be null or undefined","tags must be an array"],"error":"Bad Request","statusCode":400}

I have tried adding tags and shortLink to the values in various different places being sent in the POST request without luck and there seems to be no other documentation than what is on this page.

@egelhaus egelhaus closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2025
@egelhaus
Copy link
Collaborator

Please open an Issue in our main Repository or in our Discord Server.

@egelhaus egelhaus added the bug Something isn't working label Feb 16, 2025
@egelhaus egelhaus reopened this Feb 16, 2025
@egelhaus
Copy link
Collaborator

Never mind, this is a Documentation Issue, sorry about that.

@nmbgeek
Copy link
Author

nmbgeek commented Feb 16, 2025

I do see that shortLink and tags go in the top level of the post request and placing them there does work. However they are not documented.

It looks like they should likely be made optional here: https://github.com/gitroomhq/postiz-app/blob/c8d93aed8874de9312a47fb3f32281318b61aa03/libraries/nestjs-libraries/src/dtos/posts/create.post.dto.ts#L104

Additionally, can I specify a link for a Facebook post? I've looked through the dto files used and don't see one. https://developers.facebook.com/docs/pages-api/posts#publish-posts

This is the sample from here: https://docs.postiz.com/public-api which doesn't reference shortLink or tags and no other documentation does either.

{
  "type": "draft|schedule|now",
  "date": "2024-12-14T08:18:54.274Z",
  "posts": [
    {
      "integration": {
        "id": "asdfsad23rwdfasfsddc"
      },
      "value": [
        {
          "content": "This is my cool post",
          "id": "Only if you want to edit an existing post",
          "image": [
            {
              "id": "string"
            }
          ]
        }
      ],
      "group": "uniqueId for all the posts in the same group",
      "settings": {
        "[key]": "check each integration DTOs in the files, or wait for the error on a new request"
      }
    }
  ]
}

working version:

{
  "type": "draft|schedule|now",
  "date": "2024-12-14T08:18:54.274Z",
  "shortLink": true|false // what does this do? What link is it shortening and how is it doing so?
  "tags": [], // and this - I do see there is a create.tag.dto
  "posts": [
    {
      "integration": {
        "id": "asdfsad23rwdfasfsddc"
      },
      "value": [
        {
          "content": "This is my cool post",
          "id": "Only if you want to edit an existing post",
          "image": [
            {
              "id": "string"
            }
          ]
        }
      ],
      "group": "uniqueId for all the posts in the same group",  // what does this do?
      "settings": {
        "[key]": "check each integration DTOs in the files, or wait for the error on a new request"
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants