Apple News API Tutorial
Request channel data and publish an article using the Apple News API.
Overview
In this tutorial, you’ll use Python to request channel data and publish an article to your channel. The tutorial assumes you’re familiar with basic Python programming constructs and techniques. Beginning programmers should be able to follow along and run this tutorial.
Alternative Tutorial Code Languages
In addition to Python, the tutorial code is also available in Java, C#, and PHP. To get the code for all four, download the Apple-News-API-Tutorial-Example-Code.zip file.
Requirements
Before beginning the tutorial, make sure you have the following information and installed software:
Channel ID, Key ID, and Key Secret. See Use your CMS with News Publisher in News Publisher User Guide.
Python. Ensure that you have
PIPinstalled.PIPis automatically installed if you have Python 3.4+. See Installing Python Modules.Python’s Requests library.
If you are not familiar with Apple News API endpoints, see Apple News API before you get started.