Ray Zuchowski
Forum Replies Created
-
AuthorPosts
-
Kiran,
I solved the issue.
The .htaccess file has to be changed to this.
<IfModule mod_rewrite.c>
RewriteEngine OnRewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ – [L]RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>Also a user has to be set to author.
Just editing the post, i used the users credentials for the listing, i also tried admin credentials as well and got the same result. Could it be something on the .htaccess causing this ?
Kiran,
Thank you for the example. I did exactly what you told me to do and this is the response i get.
{“code”:”rest_cannot_edit”,”message”:”Sorry, you are not allowed to edit this post.”,”data”:{“status”:401}}
Karin,
Ok after installing everything, cli -console doesnt work with the new oauth 1.0a . Rather then using oauth, can your api use basic ? Im at a stand still here. Or what else do you recommend i do ?
Thanks
NVM the other one you sent i have to install composer.
That plugin doesnt work, this is the console version that will load.
Karin,
So i disabled the authentication and im still getting a 401 error code when trying to POST. Is there something in the API that is protecting this ? If i do a POST from the API Console in wordpress i can do it successfully. Im testing this through Postman.
According to the documentation. This should work.
https://eample.com.com/wp-json/geodir/v1/places/299/?title=My Place&content=Content goes here&gd_place_tags[]=1&gd_placecategory[]=7&geodir_beermenu=Bud?access_token=token .
I cant figure it out.
Karin,
I understand how to generate a token, but i dont see in the documentation how to process a post with the token .
Kiran,
where does the ?oauth= go in the string ?
nvm i got it reg <br> tag works.
Right now it looks like this.
Bud lite Budweiser Corona
Need to be
Bud Lite
Budweiser
CoronaKiran,
I got it working but one last question . For my geodir_beermenu=
This is a text field . How do i go about doing line breaks ? Cause right now its putting everything on one line.
Thanks
Awesome, i appreciate your help.
Could you provide me an example. The field i need to edit would be under gr_data/geodir_beermenu .
Thanks
-
AuthorPosts