goodpress
goodpress copied to clipboard
I keep getting Error 401
I am not sure if this is the right place to post this issue, but since Wordpress is not using the authorization plugin and it has been integrated inside, I believe this is what causes me an error showing that I am unauthorized with code 401. I am not sure if this is due to my credentials being wrong or something else. I have checked everything there is online but information is scarce, at least for this error.
Ah you mean you use a newer version of Wordpress stuff? I haven't used goodpress in a long time so can't help. @henrywangnl do you happen to have any insight?
Hmm, it's still working well for me as I just tested it. My WordPress is the latest: v5.9.2
I also have v5.9.2. Updated everything, talked to my hosting provider. Now I am getting bad request 400. Exact error is
Error in wp_call_api(VERB = "POST", api_url = api_url, body = post) :
Bad Request (HTTP 400).
I had the same problem (HTTP 400). I did some debugging and found that REST-API require the date to have the format
YYYY-MM-DDTHH:MM:SS.
This is controlled by the "date" field in the index.Rmd. You can remove it and WP will assume the time when it was posted. Or you define your own as long as it follows the above mentioned format.
date: "r Sys.Date()
" does not work for me as well.
@nordicai thanks for the digging! If you want, you can make a PR to improve docs/templates in this repository (and add yourself as ctb to DESCRIPTION in that case).
Also got the error code:
Error in wp_call_api(VERB = "GET", api_url = api_url) : Unauthorized (HTTP 401).
Have checked the application password, the Rmd/md file, and the .htaccess
file. Did anyone encounter the problem and get it solved?
update: I switched to the MAC OS from Windows and didn't meet the problem below
I have the same problem but I don't have access to a MAC 😞 I wonder if it's the date format which occurs if I write "2019-03-07T01:01:00" or remove it altogether.
@Lextuga007 you mean that whatever you do to the date, it doesn't work?
What OS are you on? Hoping someone has experience with it and goodpress. :sweat_smile:
There is a strong possibility that the problem is because I'd missed the step where the WordPress add in is needed! It's for a managed page so I didn't do it just in case but I haven't given up and I'll give it another go on a couple of weeks!