• Hey everybody –

    I’m trying to follow the steps in the Apple News API Client Utility README.md file and hitting a wall.

    I’ve successfully installed the Ruby CLI and created the .papi configuration file.

    I’ve placed this file in the home folder on my local machine (when I run a open ~/.papi in terminal the file launches without issue). However, when I proceed to the next step of running papi-client channel get, I get the following response:

    400 Bad Request: INVALID_TYPE
    Message:
    Key path:
    Article ID: <CHANNEL ID APPEARS HERE BACK HERE>

    My .papi file looks like this (with my values swapped for the placeholders):

    #<SiteName>
    endpoint: https://news-api.apple.com
    channel_id: <channel_id>
    key: <key>
    secret: <secret>

    Not seeing a lot of (recent) documentation around this error so I’m just not sure where to proceed from here. Any insight would be extremely helpful.

    • This topic was modified 2 years, 3 months ago by psm9640.
    • This topic was modified 2 years, 3 months ago by psm9640.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kevin Fodness

    (@kevinfodness)

    Hi @psm9640

    I’m sorry that you’re having trouble getting the Apple News API Client Utility to work. However, that software is developed and maintained by Apple, so you’ll need to follow up with Apple if it’s not working correctly for you. Once you have verified your channel credentials, if you have any issues configuring the Publish to Apple News WordPress plugin, please let me know.

    Thanks!

    Plugin Author Kevin Fodness

    (@kevinfodness)

    This document seems to indicate that you might have a typo in your channel ID: https://developer.apple.com/documentation/apple_news/apple_news_api/about_apple_news_api_error_messages?changes=_1_4

    Thread Starter psm9640

    (@psm9640)

    Thank you, Kevin! I appreciate it!

    Thread Starter psm9640

    (@psm9640)

    Hi Kevin – Back again. I have not been able to resolve issue but wanted to pick your brain…

    I’m seeing the following message in our in the wp-admin under Apple News > Sections:

    Unable to fetch a list of sections.

    Aside from the obvious (incorrect .papi info), could inability to retrieve sections from our Apple News account be to blame? Thank you again — I know this is not the plugin’s issue but I have very little recent experience with Apple News so just trying to gather as much info as possible.

    Plugin Author Kevin Fodness

    (@kevinfodness)

    Retrieving a list of settings depends on a valid API connection, so if you can’t get your .papi file working correctly via the CLI and uploaded to your WordPress site, then it won’t be able to communicate with the Apple News API at all, including fetching a list of sections. An error message indicating that a list of sections could not be fetched is usually a clear indicator to me that the API credentials are incorrect.

    Thread Starter psm9640

    (@psm9640)

    Hi Kevin – I ran the CLI and it was successful. New theory we’re working with is that our host is somehow blocking the request. To confirm, should we be seeing a post request in our server logs when we publish to Apple News (we are not currently — just getting the INVALID_TYPE error mentioned earlier).

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘INVALID_TYPE error when running papi-client channel get’ is closed to new replies.