Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting "invalid_client" error in sample gdata-objectivec-client

Hey I have just downloaded and built the youtube sample project from http://code.google.com/p/gdata-objectivec-client/source/checkout The application builds fine and I have entered the client id and secret. Then when I log in with my youtube account and click the "allow" button I get this error

Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x6a03a350 {data=<7b0a2020 22657272 6f722220 3a202269 6e76616c 69645f63 6c69656e 74220a7d>, json=<CFBasicHash 0x6a01b6b0 [0xac0251a0]>{type = mutable dict, count = 1,
entries =>
2 : <CFString 0x6a01b720 [0xac0251a0]>{contents = "error"} = <CFString 0x6a054b90 [0xac0251a0]>{contents = "invalid_client"} 

or from the xcode log:

2012-06-15 10:49:30.627 YouTubeSample[976:b03] Error Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x6980d2c0 {data=<7b0a2020 22657272 6f722220 3a202269 6e76616c 69645f63 6c69656e 74220a7d>}
Error data:
{
error = "invalid_client";
}

I have tried creating and entering new client ids to avail. It looks like the secret is not being sent properly because I get the same result if I deliberately corrupt it or even leave it blank.

Any suggestions?

like image 314
Rob Avatar asked Jun 15 '12 02:06

Rob


1 Answers

I am a little late but it might help others..

In the Google API-Console create a new client ID and set it to "Other" instead of "iOS". It should work.

like image 122
atastrophic Avatar answered Sep 28 '22 11:09

atastrophic