Question

Error 403 with webhooks api get request

  • 5 September 2023
  • 3 replies
  • 47 views

Hi, I have very little programming knowledge and I’m trying to set up API calls with Zapier to get links from Reddit posts scheduled with Postpone.app to no avail, I don’t understand why this code isn’t working after hours switching things around, any help would be amazing.

The documentation is on: https://help.postpone.app/en/api-docs/postpone-api and I’ve tested out the code itself on: https://api.postpone.app/gql. and it seems to work but on Zapier I’m getting this message: Failed to create a request in Webhooks by Zapier ERROR: The request could not be satisfied (HTTP Status Code: 403)

I’ve screenshotted the code below, the text version is: query submissions( $limit: Int = 1 ) { submissions( limit: $limit ) { objects { result { url } } } }

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @bapbipboop 

Good question.

Try changing the Method from GET to POST as per the API docs.

 

Hi, yep already tried that and: Failed to create a request in Webhooks by Zapier
POST body sent invalid JSON. (HTTP Status Code: 400) also tried:
query submissions(
  $orderBy: String
  $limit: Int = 50
  $page: Int = 50
  $startDate: DateTime
  $accounts: [String]
  $subreddits: [String]
) {
  submissions(
    orderBy: $orderBy
    limit: $limit
    page: $page
    startDate: $startDate
    accounts: $accounts
    subreddits: $subreddits
  ) {
    total
    objects {
      result {
        url
      }
    }
  }
}

as to make sure I wasn’t getting rate limited. (code comes from https://help.postpone.app/en/api-docs/query-posts-and-submissions at the bottom which I’ve tried in multiple variations)

Userlevel 7
Badge +14

@bapbipboop 

Using this example from their API docs:

 

This would be the JSON to put in the Data field.

{"query": "query profile { profile { id username email registeredAt } }", "operationName": "profile"}

 

EXAMPLE: Data field