I downloaded the sample code and wanted to learn and play with it. I followed the introduction to registered my app on the API console as Doraemon and got the client ID and secret key.
I run the OAuthSampleTouch in the iphone simulator, and typed the client ID and secret key in the text fields. It successfully redirects to the google login screen. I use my company email and personal email to login and allow the permission for the app to access data. Everything seems work well. But when the web view closed, it returns a error message to the finishedSelector as below:
*2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)"*
*Error data:*
*{*
* error = "invalid_client";*
*}* I have double checked that this error data means invalid client identifier. Do I miss something on applying for the client ID? I am new to OAuth. Please help me on this issue or point to some related documentation to resolve this problem.
Thanks a lot!
-- Best Wishes! Xinyue Zhai(翟欣玥) Seat 322C, Ext 3627
Software Engineer Infrastructure Networking Department Google China
> I downloaded the sample code and wanted to learn and play with it. I followed the introduction to registered my app on the API console as Doraemon and got the client ID and secret key.
> I run the OAuthSampleTouch in the iphone simulator, and typed the client ID and secret key in the text fields. It successfully redirects to the google login screen. I use my company email and personal email to login and allow the permission for the app to access data. Everything seems work well. But when the web view closed, it returns a error message to the finishedSelector as below: > 2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)"
> Error data:
> {
> error = "invalid_client";
> }
> I have double checked that this error data means invalid client identifier. Do I miss something on applying for the client ID? > I am new to OAuth. Please help me on this issue or point to some related documentation to resolve this problem.
On Tue, Sep 6, 2011 at 3:40 PM, Sumit Maitra <sumi...@gmail.com> wrote: > Hi, > Did you register your app as a web app or client app? I had made that > mistake first time around.
> Thanks and Regards, > Sumit.
> On Sep 5, 2011, at 10:25 PM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> > wrote:
> Hi,
> I downloaded the sample code and wanted to learn and play with it. I > followed the introduction to registered my app on the API console as > Doraemon and got the client ID and secret key.
> I run the OAuthSampleTouch in the iphone simulator, and typed the client ID > and secret key in the text fields. It successfully redirects to the google > login screen. I use my company email and personal email to login and allow > the permission for the app to access data. Everything seems work well. But > when the web view closed, it returns a error message to the finishedSelector > as below:
> *2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error > Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. > (com.google.HTTPStatus error 400.)"*
> *Error data:*
> *{*
> * error = "invalid_client";*
> *}* > I have double checked that this error data means invalid client identifier. > Do I miss something on applying for the client ID? > I am new to OAuth. Please help me on this issue or point to some related > documentation to resolve this problem.
Since I had made the mistake of registering my app as web client instead of installed client, I was getting this error. One i got the client id and key for installed app, things worked. But you seem to be on the right track so we'll have to wait for Greg to help out here.
I will look up my thread too to see if I can find something.
Regards, Sumit. On Sep 6, 2011, at 12:44 AM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> wrote:
> I registered my app as installed application. And how did you resolve the similar issue?
> On Tue, Sep 6, 2011 at 3:40 PM, Sumit Maitra <sumi...@gmail.com> wrote: > Hi, > Did you register your app as a web app or client app? I had made that mistake first time around.
> Thanks and Regards, > Sumit.
> On Sep 5, 2011, at 10:25 PM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> wrote:
>> Hi,
>> I downloaded the sample code and wanted to learn and play with it. I followed the introduction to registered my app on the API console as Doraemon and got the client ID and secret key.
>> I run the OAuthSampleTouch in the iphone simulator, and typed the client ID and secret key in the text fields. It successfully redirects to the google login screen. I use my company email and personal email to login and allow the permission for the app to access data. Everything seems work well. But when the web view closed, it returns a error message to the finishedSelector as below: >> 2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)"
>> Error data:
>> {
>> error = "invalid_client";
>> }
>> I have double checked that this error data means invalid client identifier. Do I miss something on applying for the client ID? >> I am new to OAuth. Please help me on this issue or point to some related documentation to resolve this problem.
I must apologize, I was getting 400 - redirect_uri_mismatch and not invalid client ID. Please disregard my earlier comments. One thing that might help is, which Service API did you register the app for?
On Tue, Sep 6, 2011 at 12:54 AM, Sumit Maitra <sumi...@gmail.com> wrote: > Hello Xinyue,
> Since I had made the mistake of registering my app as web client instead of > installed client, I was getting this error. One i got the client id and key > for installed app, things worked. But you seem to be on the right track so > we'll have to wait for Greg to help out here.
> I will look up my thread too to see if I can find something.
> Regards, > Sumit.
> On Sep 6, 2011, at 12:44 AM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> > wrote:
> Hi Sumit,
> I registered my app as installed application. And how did you resolve the > similar issue?
> On Tue, Sep 6, 2011 at 3:40 PM, Sumit Maitra < <sumi...@gmail.com> > sumi...@gmail.com> wrote:
>> Hi, >> Did you register your app as a web app or client app? I had made that >> mistake first time around.
>> Thanks and Regards, >> Sumit.
>> On Sep 5, 2011, at 10:25 PM, Xinyue Zhai (翟欣玥) < <xinyuez...@google.com> >> xinyuez...@google.com> wrote:
>> Hi,
>> I downloaded the sample code and wanted to learn and play with it. I >> followed the introduction to registered my app on the API console as >> Doraemon and got the client ID and secret key.
>> I run the OAuthSampleTouch in the iphone simulator, and typed the client >> ID and secret key in the text fields. It successfully redirects to the >> google login screen. I use my company email and personal email to login and >> allow the permission for the app to access data. Everything seems work well. >> But when the web view closed, it returns a error message to the >> finishedSelector as below:
>> *2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error >> Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. >> (com.google.HTTPStatus error 400.)"*
>> *Error data:*
>> *{*
>> * error = "invalid_client";*
>> *}* >> I have double checked that this error data means invalid client >> identifier. Do I miss something on applying for the client ID? >> I am new to OAuth. Please help me on this issue or point to some related >> documentation to resolve this problem.
On Tue, Sep 6, 2011 at 4:07 PM, Sumit Maitra <sumi...@gmail.com> wrote: > Hello Xinyue,
> I must apologize, I was getting 400 - redirect_uri_mismatch and not invalid > client ID. Please disregard my earlier comments. One thing that might help > is, which Service API did you register the app for?
> Thanks and Regards, > Sumit.
> On Tue, Sep 6, 2011 at 12:54 AM, Sumit Maitra <sumi...@gmail.com> wrote:
>> Hello Xinyue,
>> Since I had made the mistake of registering my app as web client instead >> of installed client, I was getting this error. One i got the client id and >> key for installed app, things worked. But you seem to be on the right track >> so we'll have to wait for Greg to help out here.
>> I will look up my thread too to see if I can find something.
>> Regards, >> Sumit.
>> On Sep 6, 2011, at 12:44 AM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> >> wrote:
>> Hi Sumit,
>> I registered my app as installed application. And how did you resolve the >> similar issue?
>> On Tue, Sep 6, 2011 at 3:40 PM, Sumit Maitra < <sumi...@gmail.com> >> sumi...@gmail.com> wrote:
>>> Hi, >>> Did you register your app as a web app or client app? I had made that >>> mistake first time around.
>>> Thanks and Regards, >>> Sumit.
>>> On Sep 5, 2011, at 10:25 PM, Xinyue Zhai (翟欣玥) < <xinyuez...@google.com> >>> xinyuez...@google.com> wrote:
>>> Hi,
>>> I downloaded the sample code and wanted to learn and play with it. I >>> followed the introduction to registered my app on the API console as >>> Doraemon and got the client ID and secret key.
>>> I run the OAuthSampleTouch in the iphone simulator, and typed the client >>> ID and secret key in the text fields. It successfully redirects to the >>> google login screen. I use my company email and personal email to login and >>> allow the permission for the app to access data. Everything seems work well. >>> But when the web view closed, it returns a error message to the >>> finishedSelector as below:
>>> *2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error >>> Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. >>> (com.google.HTTPStatus error 400.)"*
>>> *Error data:*
>>> *{*
>>> * error = "invalid_client";*
>>> *}* >>> I have double checked that this error data means invalid client >>> identifier. Do I miss something on applying for the client ID? >>> I am new to OAuth. Please help me on this issue or point to some related >>> documentation to resolve this problem.
I found this issue very interesting. Today I debug the whole sample code, and find that the app can successfully get the authorization code. But when using fetcher to get the access code, it receives the invalid_client error message. So I guess there must be something wrong with the client id. Then I register a test project and get new client id and client secret. Everything works well. The procedure for applying client id for the two projects are the same, but I don't know why the results are a little different.
Thanks.
On Tue, Sep 6, 2011 at 4:13 PM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com>wrote:
> On Tue, Sep 6, 2011 at 4:07 PM, Sumit Maitra <sumi...@gmail.com> wrote:
>> Hello Xinyue,
>> I must apologize, I was getting 400 - redirect_uri_mismatch and not >> invalid client ID. Please disregard my earlier comments. One thing that >> might help is, which Service API did you register the app for?
>> Thanks and Regards, >> Sumit.
>> On Tue, Sep 6, 2011 at 12:54 AM, Sumit Maitra <sumi...@gmail.com> wrote:
>>> Hello Xinyue,
>>> Since I had made the mistake of registering my app as web client instead >>> of installed client, I was getting this error. One i got the client id and >>> key for installed app, things worked. But you seem to be on the right track >>> so we'll have to wait for Greg to help out here.
>>> I will look up my thread too to see if I can find something.
>>> Regards, >>> Sumit.
>>> On Sep 6, 2011, at 12:44 AM, Xinyue Zhai (翟欣玥) <xinyuez...@google.com> >>> wrote:
>>> Hi Sumit,
>>> I registered my app as installed application. And how did you resolve the >>> similar issue?
>>> On Tue, Sep 6, 2011 at 3:40 PM, Sumit Maitra < <sumi...@gmail.com> >>> sumi...@gmail.com> wrote:
>>>> Hi, >>>> Did you register your app as a web app or client app? I had made that >>>> mistake first time around.
>>>> Thanks and Regards, >>>> Sumit.
>>>> On Sep 5, 2011, at 10:25 PM, Xinyue Zhai (翟欣玥) <<xinyuez...@google.com> >>>> xinyuez...@google.com> wrote:
>>>> Hi,
>>>> I downloaded the sample code and wanted to learn and play with it. I >>>> followed the introduction to registered my app on the API console as >>>> Doraemon and got the client ID and secret key.
>>>> I run the OAuthSampleTouch in the iphone simulator, and typed the client >>>> ID and secret key in the text fields. It successfully redirects to the >>>> google login screen. I use my company email and personal email to login and >>>> allow the permission for the app to access data. Everything seems work well. >>>> But when the web view closed, it returns a error message to the >>>> finishedSelector as below:
>>>> *2011-09-06 13:11:36.238 OAuthSampleTouch[12454:40b] Error Error >>>> Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. >>>> (com.google.HTTPStatus error 400.)"*
>>>> *Error data:*
>>>> *{*
>>>> * error = "invalid_client";*
>>>> *}* >>>> I have double checked that this error data means invalid client >>>> identifier. Do I miss something on applying for the client ID? >>>> I am new to OAuth. Please help me on this issue or point to some related >>>> documentation to resolve this problem.
I just experienced this issue. My advice: triple check your Client ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in the secret for a '1' (the number 1).
I know I'm "late to the party", but I ran into this issue today while trying to get the GTM OAuth2 lib calls to work. I triple checked my IDs, etc., but everything was correct. I found the solution to my issue was in the GTM OAuth2 introduction web page ( http://code.google.com/p/gtm-oauth2/wiki/Introduction), which stated:
"In the console, create a project, then click "API Access" in the left column. Create a new Client ID for an *Installed Application* (not a web application) type *other* (not iOS)."
I had registered my app as an "iOS" installed app, and when I changed it to "other", everything worked.
On Tuesday, October 11, 2011 10:42:47 PM UTC-7, Chris Lacy wrote:
> I just experienced this issue. My advice: triple check your Client > ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in > the secret for a '1' (the number 1).
On Thursday, October 4, 2012 6:03:43 AM UTC+2, Scot Stennis wrote:
> I know I'm "late to the party", but I ran into this issue today while > trying to get the GTM OAuth2 lib calls to work. I triple checked my IDs, > etc., but everything was correct. I found the solution to my issue was in > the GTM OAuth2 introduction web page ( > http://code.google.com/p/gtm-oauth2/wiki/Introduction), which stated:
> "In the console, create a project, then click "API Access" in the left > column. Create a new Client ID for an *Installed Application* (not a web > application) type *other* (not iOS)."
> I had registered my app as an "iOS" installed app, and when I changed it > to "other", everything worked.
> Hope that helps someone else too.
> On Tuesday, October 11, 2011 10:42:47 PM UTC-7, Chris Lacy wrote:
>> I just experienced this issue. My advice: triple check your Client >> ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in >> the secret for a '1' (the number 1).
> Same here. i downloaded the DrEdit sample code. Enabled the APIs Console > to use the Drive API. Obtained a CliendID/Secret for Desktop > Application/iOS.
> However i receive the infamous 400 error: * error = "invalid_client";*
> Any hints?
> -- > c.
> On Thursday, October 4, 2012 6:03:43 AM UTC+2, Scot Stennis wrote:
>> I know I'm "late to the party", but I ran into this issue today while >> trying to get the GTM OAuth2 lib calls to work. I triple checked my IDs, >> etc., but everything was correct. I found the solution to my issue was in >> the GTM OAuth2 introduction web page ( >> http://code.google.com/p/gtm-oauth2/wiki/Introduction), which stated:
>> "In the console, create a project, then click "API Access" in the left >> column. Create a new Client ID for an *Installed Application* (not a web >> application) type *other* (not iOS)."
>> I had registered my app as an "iOS" installed app, and when I changed it >> to "other", everything worked.
>> Hope that helps someone else too.
>> On Tuesday, October 11, 2011 10:42:47 PM UTC-7, Chris Lacy wrote:
>>> I just experienced this issue. My advice: triple check your Client >>> ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in >>> the secret for a '1' (the number 1).
On Saturday, October 6, 2012 3:23:20 PM UTC+5:30, valvoline wrote:
> Same here. i downloaded the DrEdit sample code. Enabled the APIs Console > to use the Drive API. Obtained a CliendID/Secret for Desktop > Application/iOS.
> However i receive the infamous 400 error: * error = "invalid_client";*
> Any hints?
> -- > c.
> On Thursday, October 4, 2012 6:03:43 AM UTC+2, Scot Stennis wrote:
>> I know I'm "late to the party", but I ran into this issue today while >> trying to get the GTM OAuth2 lib calls to work. I triple checked my IDs, >> etc., but everything was correct. I found the solution to my issue was in >> the GTM OAuth2 introduction web page ( >> http://code.google.com/p/gtm-oauth2/wiki/Introduction), which stated:
>> "In the console, create a project, then click "API Access" in the left >> column. Create a new Client ID for an *Installed Application* (not a web >> application) type *other* (not iOS)."
>> I had registered my app as an "iOS" installed app, and when I changed it >> to "other", everything worked.
>> Hope that helps someone else too.
>> On Tuesday, October 11, 2011 10:42:47 PM UTC-7, Chris Lacy wrote:
>>> I just experienced this issue. My advice: triple check your Client >>> ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in >>> the secret for a '1' (the number 1).
On Thursday, October 4, 2012 2:03:43 PM UTC+10, Scot Stennis wrote:
> I know I'm "late to the party", but I ran into this issue today while > trying to get the GTM OAuth2 lib calls to work. I triple checked my IDs, > etc., but everything was correct. I found the solution to my issue was in > the GTM OAuth2 introduction web page ( > http://code.google.com/p/gtm-oauth2/wiki/Introduction), which stated:
> "In the console, create a project, then click "API Access" in the left > column. Create a new Client ID for an *Installed Application* (not a web > application) type *other* (not iOS)."
> I had registered my app as an "iOS" installed app, and when I changed it > to "other", everything worked.
> Hope that helps someone else too.
> On Tuesday, October 11, 2011 10:42:47 PM UTC-7, Chris Lacy wrote:
>> I just experienced this issue. My advice: triple check your Client >> ID/Secret are correct. In my case, I was mistaking a 'l' (the letter L) in >> the secret for a '1' (the number 1).