Oauth token server side

Just follow the same flow but with the server making the calls, some pointers here Refreshing token?