Getting a 422 error while making a post request

const res = await fetch( "https://gorest.co.in/public/v2/posts", { headers: { "Authorization": Bearer ${API_TOKEN}, 'Accept': 'application/json', "Content-Type": 'application/json' } }

Respose data says "user" must exist. It worked 2-3 times before

The user I'd used in the body should exists.

If the user is modified or added by someone else then you can't add posts to that user.

Please create or modify any user and use that user Id in payload


Little markdown supported