I have completed steps of authorization and obtained access token and refresh token.
What should I do next to generate access token using refresh token that I have s
If you want to implement that yourself, the OAuth 2.0 flow for Web Server Applications is documented at https://developers.google.com/accounts/docs/OAuth2WebServer, in particular you should check the section about using a refresh token:
https://developers.google.com/accounts/docs/OAuth2WebServer#refresh