Hi, Are you using one of our client library examples to get the refresh token, or generating the OAuth2 requests manually?
Also, when you say "when i try to use this refresh token and ClientCustomerId next day" are you definitely using the *refresh* token and not the *access* token the next day? The *access* token is only valid for a specific amount of time, after which you would need to use the *refresh* token to get a new *access* token. Our client libraries handle this for you, which is why I'm curious if you are using one of the libraries. Thanks, Josh, AdWords API Team On Tuesday, January 28, 2014 3:53:24 AM UTC-5, Eldar Useinov wrote: > > Thank you for your answer. > Now i have different question. I recieve refreshToken for user account, > than get data from his account (using java and php client libraries). > Everything is ok. But when i try to use this refresh token and > ClientCustomerId next day i face the "invalid_grant" error. > > When i try to authenticate again for this user and get new refresh token, > it's working again. What's the reason of this error could be? > > Thank you. > > понедельник, 27 января 2014 г., 20:02:54 UTC+2 пользователь Josh Radcliff > (AdWords API Team) написал: >> >> Hi, >> >> In your other Java application did you use the same clientId and >> clientSecret that you used to get the refresh token? The refresh token is >> tied to those values, so if you try to use it for a different clientId and >> clientSecret you'll hit the "Unauthorized user" error. >> >> Thanks, >> Josh, AdWords API Team >> >> On Thursday, January 23, 2014 10:51:22 AM UTC-5, Eldar Useinov wrote: >>> >>> Hi. >>> >>> I have a question about OAuth2 and refresh token. >>> >>> I recieved refresh token and ClienCustomerID for some user after he >>> grant access to his account in my application (it was registered like web >>> flow-application) >>> when i try to get data from his account in my php application it's ok. >>> But i have another java application that try to get data from same account >>> (using saved refresh token and ClienCustomerID) and i've got error >>> "Unauthorized user". >>> >>> What i did wrong? >>> Can i use Refresh token and ClienCustomerID for any applications (php, >>> java)? >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
