how to get access token with OAuth
-
Hi there,
I’m new to wordPress. I’m trying to figure out how to get access token using oauth plugin, I need a way for browser to access the pages in wordPress from my web application.
I installed wordPress 4.8 free version (download from www.ads-software.com), and then installed oauth plugin. I created a user TestUser, and added this TestUser as a client using Oauth server. I got client id and client secret.I found the instruction about getting https://wp-oauth.com/kb/using-postman-and-wp-rest-api/ about getting access token using postman. so from postman
the instruction does not say url, so I put post url “https://localhost/wordpress/auth”
method: POST
authorization:
type : basic Auth (question here: it is oauth, why we use basic auth??)
username : I put client id here
password: I put client secret here
then postman button “update request” make it as a header for “Authorization”
header:
Content-Type : application/x-www-form-urlencoded
body:
grant_type=password (??? why grant type is password??)
username : I put the user name “TestUser”
password : password for user “TestUser”, this is not client secretwhen I click “send”, I got 404 error.
I think I don’t fully understand how to get access token here. Can someone help me?
I also don’t understand this instruction:
1. what url should be used to get access token with wordPress ?
2. why authorization header is type “Basic Auth”
3. I have client id and client secret already, why do I still need to provide userid and password?
4 where did I do wrong? how I can get access token?Thanks a lot,
Helen
- The topic ‘how to get access token with OAuth’ is closed to new replies.