Could not locate API; are you sure it's enabled? - WP REST API oAuth1 - wordpress

I am getting:
"Could not locate API; are you sure it's enabled?"
When I try to link client to WordPress via WP REST API.
I have installed & activated all necessary plugins and dependencies, including (WP-REST API, oAuth1 etc).
When I try HEAD http://mywebsitelink, it returns link with wp-json which indicates WP-API is working.
Also, when I try wp oauth1 add, it works fine and generates key and secret.
Any suggestion on how to fix this issue? Thanks in advance.

If you are using the Client CLI package to connect the client with the WP REST API then please be informed that the latest version of the OAuth1.0a plugin doesn't work with the Client CLI package.
However, you can use an HTTP client to generate token credentials and then connect to the server using the OAuth1.0a plugin.

Related

Firebase Hosting Webhooks

I have this specific use case that I'm trying to solve with Firebase Hosting and it's the following:
I'm using Gridsome to generate static websites
Before building, Gridsome uses Graphql and grabs from a Headless CMS some blog posts, which then are used to create static pages for each of them
Currently, the Gridsome build is automatically deployed to Firebase Hosting whenever I merge into master through Github (this works great already)
The problem that I'm facing is that I want to trigger a Gridsome build + Firebase Hosting deploy whenever I publish a new blog post on my Headless CMS (It has the option to make a POST on new blog post). I know this is possible on other solutions like Vercel, but right now I'm using Firebase and would like to stick to the suite.
I've tried using the REST API without any luck, and Github Webhooks works the other way around and doesn't solve my problem. I'm thinking there might be a chance to call a Firebase function and use the CLI to deploy or something.
What I would like to know is if this feature exists and how to accomplish this scenario.
Thanks.
I assume you use Github Actions to build your project and then deploy it to firebase.
The easiest solution that I would recommend for you is to set up your Action to trigger not only on a push into your master branch, but also for a request.
Steps
Set your Action trigger for the repository_dispatch Event
on:
repository_dispatch:
Then create an Access token for your Github Account with repo and workflow permission.
Now you just have to set your CMS Post Request on the following URL https://api.github.com/repos/<username>/<repo>/dispatches with your Authorization Token in the Header.
Example:
curl --url 'https://api.github.com/repos/<USERNAME>/<REPO>/dispatches' \
--header 'authorization: Bearer <TOKEN>' \
--data '{"event_type": "content updated"}'
Now your Action should also dispatch whenever you make a POST Request from your CMS to the endpoint.

Wordpress Connect to SmartSheet via REST/JSON/Auth

I am trying to make a WordPress site that will use data from SmartSheet. I need to Authenticate(Authorization) to get into SmartSheet. SS uses an API Access token to get access. All of this works fine in postman. My question is: Are there plugins for this? Or should I be writing a plugin for this? Any good resources for this?
There is no official WordPress connector from Smartsheet.

WP JSON API with OAuth - Proper channel

I have Have WP API and OAuth1 plugins installed for my python frontend to access posts in wordpress. With CLI wp oauth add I have generated secret and key also. But am stuck on how to proceed further. I can check api responses via chrome advanced REST client.
I get proper JSON responses from requests like GET http://mylocal.site/wp-json/posts
But I want to add authentication. Read numerous docs from api and oauth...but nowhere a proper work flow. Please shed some light who have worked with these already.
Thanks.
I got this working following the base https://github.com/WP-API/OAuth1

Tweet from Meteor js server

Has anyone had any luck tweeting from the server with Meteor (Application-only authentication)? I want to give status updates when there is a new item added to a collection. I'm curious the best way to do this? Is there a good package that you would recommend?
First of all you need to have AccessToken of twitter to post, regardless of if you using meteor twitter login or app-only authentication.
Here are some libraries from Atmosphere-
Official Twitter OAuth lib- just for authentication- https://atmospherejs.com/meteor/twitter
and
Here is Npm wrapper for twitter, which can be used for both authentication and posting status, etc -
https://atmospherejs.com/cscottnet/twitter

How do I access the latest blog posts?

I've word-press blog installed on my Godaddy's Domain.
www.mysite.com/blog
I want to get the latest posts of my blog using C#/ASP.Net code, how can I do this?
WordPress provides an XML-RPC API that includes getPosts and similar function. You can find a couple of pre-built clients for it on NuGet; I haven't tried either to recommend them but from the GitHub readme the first one looks more complete:
POSSIBLE.WordPress.XmlRpcClient (NuGet)
WordPress XML-RPC Client for .NET (NuGet)
Also if you've got the Jetpack plugin installed on your site then that adds a JSON API. I can't recommend one sorry but again there'll be OAuth2 and REST API clients on NuGet.
Ok guys; basically i required my latest blogs post , so what i used
http://p3k.org/rss/
p3k.org/ takes the path of my blog feed and returns me latest post.
I simply embed in my project using the generated script . So i don't need to get info ASP.net code .
Cheers!
As per my view and research, you can access wordpress DB in asp.net c# by using MySqlConnection.
Please visit following link for more information about MySQL Connection.
http://www.codeproject.com/Tips/355977/Csharp-ASP-NET-MySQL-Connection-Tutorial-with-MySQ

Resources