for controller::: doorkeeper_for :all require 'rest-client' require 'json' def index client_id = 'my_client_id...' client_secret = 'my_client_secret...' response = RestClient.post 'http://localhost:3000/oauth/token', { grant_type: 'client_credentials', client_id: client_id, client_secret: client_secret } token = JSON.parse(response)["access_token"] getiing data to apis for doorkeeper----------------- ####Getting data from doorkeeper api########## response = RestClient.get('http://localhost:3000/api/v1/profiles.json', { 'Authorization' => "Bearer #{token}"}) data = JSON.parse(response) p data.inspect ####Posting data to api########## response_user = RestClient.post('http://localhost:3000/api/v1/profiles.json',{ profile: { first_name: params[:first_name] last_name: params[:last_name] }}...
I love Ruby on rails.Ruby on Rails Coding is not my job its my passion ..