Support » Plugin: WP OAuth Server (OAuth Authentication) » Creating a new OAuth client programatically

  • Resolved researchables

    (@markcorgan)


    Firstly, fantastic plugin! I’ve been searching for a clean way to integrate OAuth with WP-API and this plugin works beautifully. Thanks for that.

    I would like to programmatically create OAuth clients and issue keys. I have an API that requires first that a user signup through the usual WP registration. The next step would be for the user to create a client and generate an “API” key, which is then stored in their user profile.

    I looked through the code and couldn’t really understand how clients and keys are generated via the admin “Clients” tab. Can you help me with an example of how I can use the plugin code to programmatically create an OAuth client? Maybe reuse the call from the POST made when creating a new client from the admin “Clients” tab?

    If I can get this part figured out I’ll surely buy a license since this plugin saves me a lot of manual work. Thanks.

    https://wordpress.org/plugins/oauth2-provider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter researchables

    (@markcorgan)

    Is there anyone who can help with this? I realize this is likely beyond normal support but I just need to know the call used when creating a client from the Clients tab. Thanks.

    Plugin Author Justin Greer

    (@justingreerbbi)

    Hi @researchables,

    Sorry for the delay. I do not monitor the support forums here. Support topics should be posted at our website.

    There is no functionality that can be reused for creating clients. You can refer to /library/content/create-new-client.php to see how it is done.

    Thread Starter researchables

    (@markcorgan)

    Thanks Justin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Creating a new OAuth client programatically’ is closed to new replies.