api_key, JetPack, and stats.wordpress.com questions
-
We have a few sites using JetPack successfully, each with a widget that shows the most popular posts according toe JetPack/stats.wordpress.com on a sidebar.
Looking at the widget, we see they use
stats_get_csv
from Jetpack to callhttps://stats.wordpress.com/csv.php
.We hoped to use this same data on another site we own that is not on WordPress, allowing us to bring traffic back from that site to our WordPress sites. Our ideal circumstance would be to use the same JetPack stats data on these non-WP sites as is used on our WP sites.
Making a call to the stats endpoint using Postman, we get a response saying we need to provide an
api_key
andblog_id
(orblog_uri
) with the request.We believe the
blog_id
is stored in thewp_options
table…but we’re stumped on theapi_key
.Searching the internet suggests api keys are discontinued, with the exception of those needed for Akismet.
Sooooo…..questions:
- Are calls to JetPack for stats only allowed from the hosting server, itself?
- If calls can be made from other locations, how do we obtain an api_key?
- If we can only make the call from the hosting server, can we cache and pass this information along through WP to the other non-WP sites we own?
- Is there an API guide, best-practices, or rules for being a good JetPack API consumer anyplace, so we know we’re doing the right thing?
- The topic ‘api_key, JetPack, and stats.wordpress.com questions’ is closed to new replies.