Support » Fixing WordPress » WP REST API – Access to content by API Key

  • thegermin8er

    (@thegermin8er)


    Hi,

    How can I give access to my wp rest api content (posts, custom post types etc.) to third party clients (i.e mobile apps) with an API Key that I provide (not to login, just to get the content), and prevent access to the content for anyone without an API Key?

    • This topic was modified 4 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Carike

    (@carike)

    Thread Starter thegermin8er

    (@thegermin8er)

    Thank you for your replay,

    I’ve read it and I do not get it (currently learning to customize wp rest api endpoints), everything seams to be about logging in, just want an API Key to append in the request from a native iOS app, like some of the common API’s does it.

    Using a nonce set somewhere in my wordpress plugin/theme and then used in the app seams to be the way, but at the same time not, since it expires (maybe it does not have to).

    Then I read:

    “While cookie authentication is the only authentication mechanism available natively within WordPress, plugins may be added to support alternative modes of authentication that will work from remote applications.”

    So I read the information in the “Application Passwords” plugin and the “JWT Authentication for WP REST API” plugin, but they seams to be just about authentication also, can not find anything about authorization (maybe have to digg deeper).

    Do I have to use one of these plugins or can I achieve what I want with WP REST API?

    Thread Starter thegermin8er

    (@thegermin8er)

    Ok managed to break out of my thougt and read it through a tenth time, seams like this is not possible with WP REST API.

    Guess I have to lock down the WP REST API for not logged in users and send everything through firebase.

    Anyone have any advice to achieve this with WP REST API or a plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP REST API – Access to content by API Key’ is closed to new replies.