Title: Creating a new OAuth client programatically
Last modified: August 30, 2016

---

# Creating a new OAuth client programatically

 *  Resolved [researchables](https://wordpress.org/support/users/markcorgan/)
 * (@markcorgan)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/creating-a-new-oauth-client-programatically/)
 * 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/](https://wordpress.org/plugins/oauth2-provider/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [researchables](https://wordpress.org/support/users/markcorgan/)
 * (@markcorgan)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/creating-a-new-oauth-client-programatically/#post-6647886)
 * 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](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/creating-a-new-oauth-client-programatically/#post-6647943)
 * 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](https://wordpress.org/support/users/markcorgan/)
 * (@markcorgan)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/creating-a-new-oauth-client-programatically/#post-6647947)
 * Thanks Justin!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Creating a new OAuth client programatically’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

## Tags

 * [client](https://wordpress.org/support/topic-tag/client/)
 * [OAuth](https://wordpress.org/support/topic-tag/oauth/)

 * 3 replies
 * 2 participants
 * Last reply from: [researchables](https://wordpress.org/support/users/markcorgan/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/creating-a-new-oauth-client-programatically/#post-6647947)
 * Status: resolved