Hi Nadine, Still my refresh token is empty. My logs:
AdsClientLibs.RequestInfoLogs Information: 1 : host=accounts.google.com,url=/o/oauth2/token,Content-Type: application/x-www-form-urlencoded, Host: accounts.google.com, TimeStamp: Wed, 08 Apr 2015 15:56:00 GMT, code=4%2feZigbElUJzTfPvRzDcgvxolkIZFJ30jLAGbA3tmn_mY.snhw8qCGuzkbYFZr95uygvUB4KEymQI&client_id=524.....29-lsp7.......6seth.apps.googleusercontent.com&client_secret=******&redirect_uri=http%3a%2f%2flocalhost%3a50246%2fOAuthLogin.aspx&grant_type=authorization_code&refresh_token=******,Result=Success AdsClientLibs.SoapXmlLogs Information: 1 : -----------------BEGIN API CALL--------------------- Request ------- POST /o/oauth2/token Content-Type: application/x-www-form-urlencoded Host: accounts.google.com TimeStamp: Wed, 08 Apr 2015 15:56:00 GMT code=4%2feZ.....QI&client_id=524....029-l......h.apps.googleusercontent.com&client_secret=******&redirect_uri=http%3a%2f%2flocalhost%3a50246%2fOAuthLogin.aspx&grant_type=authorization_code&refresh_token=****** Response -------- Pragma: no-cache Content-Disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Alternate-Protocol: 443:quic,p=0.5 Vary: Accept-Encoding Transfer-Encoding: chunked Accept-Ranges: none Cache-Control: no-cache, no-store, max-age=0, must-revalidate Content-Type: application/json; charset=utf-8 Date: Wed, 08 Apr 2015 13:56:01 GMT Expires: Fri, 01 Jan 1990 00:00:00 GMT Server: GSE TimeStamp: Wed, 08 Apr 2015 15:56:01 GMT {"access_token":"******","token_type":"Bearer","expires_in":"3599","id_token":"eyJ...........................................................................................lSHBP3pZMtNCT6oSsOnaKbGUldOA"} -----------------END API CALL----------------------- In my opinion, the server is not sending the refresh token back. I have a few questions. Parameter "access_type" should not be "offline"? In request, Post should not be "/o/oauth2/auth". In my request is "/o/oauth2/token" Thank you for help. W dniu piątek, 3 kwietnia 2015 18:03:00 UTC+2 użytkownik Nadine Sundquist (AdWords API Team) napisał: > > Hi Marcin, > > Let me recap the process that you're following. It should be this: > > 1. Follow the OAuth2 ASP.NET code example on how to do an OAuth2 flow > and capture the access and refresh token. > 2. Set the access and refresh token to user.Config dynamically at > runtime and call CustomerService.get() > 3. Set the customerId to user.Config dynamically and make further > calls. > > Here are some troubleshooting tips on figuring out why your refresh token > is not coming back: > > - You may have another login session active somewhere that is > interfering with the flow. > - Close the browser. > - Close the Visual Studio debugger web server (if it is accessible > from the system tray). > - Try running through the whole flow again. > - If that does not work, the refresh token may not be making itself > available to the flow. > - Turn on logging and see if the server is sending the refresh > token back. The refresh token may be getting sent back, but the client > library may not be picking it up. > - Here's a guide > > <https://github.com/googleads/googleads-dotnet-lib/wiki/How-to-capture-SOAP-messages> > on > capturing messages. > > Best, > Nadine, AdWords API Team > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e0879431-6203-4c06-bd09-428160b17188%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.