Testing WPLMS oAuth2 and generating new Token for testing

If you want to generate tokens for your users for using the WPLMS API in a separate project then this could be useful.


When you open this in the browser, it will redirect you to the WP login screen, once you login you’re redirected to a URL like this:

or a URL something like this (if you’re already logged in ):


Now we need to use this AUTHORIZATION_CODE to get the token for the user.

Copy the AUTHORIZATION_CODE from the URL and then create a post request :

YOUR_WPLMS_SITE_LINK/wplmoauth/token and in the body we need to POST these parameters

grant_type: ‘authorization_code’,

and you’ll get the token for the user.

Was this article helpful?

Related Articles

1 Comment

  1. tuaptitud

    I would like more information on how this works, I find it interesting.

    Does this work in conjunction with course purchase codes?

Leave A Comment?