When you create an OAuth app, you will get a OAuth Client Key & OAuth Client Secret at the table under
Inbound Authentication Configuration ->OAuth/OpenID Connect Configuration. Please use this as the consumer key and consumer secret to obtain the access token.
creating the access token can be done as combining the consumer key and consumer secret as follows and encode it by base64.
for e.g : FNZ8oxGPxWer_2elrZBoueS4XcYa:gr0JizDbStaFelXBV06cahh7Lxga
after encoding the above looks as : Rk5aOG94R1B4V2VyXzJlbHJaQm91ZVM0WGNZYTpncjBKaXpEYlN0YUZlbFhCVjA2Y2FoaDdMeGdh
Add the encoded value as follows in the CURL command.
The below Curl command is an example on how you could use it :
curl -k -d "grant_type=password&username=admin&password=admin" -H "Authorization" -H "Authorization: Basic Rk5aOG94R1B4V2VyXzJlbHJaQm91ZVM0WGNZYTpncjBKaXpEYlN0YUZlbFhCVjA2Y2FoaDdMeGdh, Content-type=application/x-www-form-urlencoded" https://domain:9443/oauth2/token
You could also find the following useful
[1] https://docs.wso2.com/display/IS500/Configuring+Inbound+Authentication+for+a+Service+Provider
[2] http://blog.lasindu.com/2014/12/wso2-identity-server-provision-service.html
[3]https://docs.wso2.com/display/IS500/OAuth+Token+Revocation+with+WSO2+Identity+Server
Hope this helps.
Regards,
Shani.