В браузере ---------- https://accounts.google.com/o/oauth2/auth?approval_prompt=none&client_id=[your_client_id]&redirect_uri=https://example.com/b2/test/oauth&response_type=code&scope=https%3A//mail.google.com/&include_granted_scopes=true в консоли ---------- curl -d \ --request POST \ --data "code=[code_from_previous_step]&client_id=[your_client_id]&client_secret=[your_client_secret]&redirect_uri=https://example.com/googleoauth/&grant_type=refresh_token&grant_type=authorization_code" \ https://accounts.google.com/o/oauth2/token