I want to get data from cloud foundry using curl, but I\'m not able to authenticate (oauth against CF). Please, could someone point me to and example how to get oauth token?
If you have already logged in using cf, you will find that the authorization token is stored in ~/.cf/config.json under they key "AccessToken". You can easily pull it out of there.
If you need to get the Authorization bearer token yourself without using the cf CLI you can follow the instructions at https://www.ng.bluemix.net/docs/#services/AppUserRegistry/index.html#appuserregistry . You can also export CF_TRACE=true and then do a cf login yourself and watch the REST dance the CLI does with the server to get the authorization token.