The operation failed with an error. [400] Bad Request

I have logged in and verified my reddit connection and it all seems to show up in reddit settings too

Even if I don’t try to complicate things and I make my “Submit a Post” Module not use any images or links, and it’s just plain text to multiple subreddits it always comes back with

  • The operation failed with an error. [400] Bad Request


I have got somewhere, where if I dont use a “flair” in a subreddit that doesn’t require it, test posts seem to work

However, if a subreddit requires a flair, when I use one (I check the subreddit for spelling) - it will fail with the 400 error - with the flair spelt the same, or left blank - so both

Not sure if it’s a problem with the module

Not that familiar with Reddit APIs, but can you try this using flair_id instead of flair_text in Flair field, and see if it works for you?

1 Like

Where would I find the flair ID

And how would I type it exactly into the flair field?

I will look this up in the meantime incase I find an answer but I did already try last night

2 Likes


The flair field doesn’t specify what kind of data (ID or Plain Text) that should be enterered

I also don’t have advanced settings like I would on other modules where I could input things differently


It just says Flair

How do I know which to enter?

I also thinking finding an ID is hard unless you moderate the subreddit

Looks like it uses flair_id as value over the flair_text one
image

I submitted a test post to r/animalcrossing with the link_flair_template_id and that seems to work :slight_smile: .

image

Now, obtaining the link_flair_template_id is a tad annoying, but doable through JSON of the subreddit.

You can get the json code from each subreddit through this URL: https://www.reddit.com/r/AnimalCrossing/.json

This will grab a json dump with a bunch of posts in. If you copy-paste that output into a json parser, you can find all the link_flair_template_id values in there (or at least, the ones most used in posts).

image

It’s not the most efficient way, but it’s the best one I’ve found.

Ofc you can get Make to loop over this and find those template_id’s for you. :wink:

3 Likes

I meant to update this, but you are correct, a friend helped and it is infact an ID value that goes here, maybe the module should be updated to say this in brackets so people don’t enter text, but it’s only a minor issue

Yes finding the ID is a pain, my friend had another method too which took a little longer, I will attempt this now just so I understand it, but thanks for the solution and help, I do appreciate it

2 Likes