Inn0vat0r / stackoverflow-java-sdk

Automatically exported from code.google.com/p/stackoverflow-java-sdk
0 stars 0 forks source link

applicationKey issue with stackoverflow-java-sdk API #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I was trying to access through JAVA API stackoverflow-java-sdk
https://code.google.com/p/stackoverflow-java-sdk/

and also The "No Key" limit is meant for light experimentation and simple 
development work. For higher higher limit,i have registered stackoverflow 
application for a key.

with registration I got :

client.id=XXXXXXX
client.secret=XXXXXXX
key=XXXXXXX

I code, i am passing key as applicationkey. as given below.

String applicationKey = "XXXXXXX";
StackExchangeApiQueryFactory queryFactory = StackExchangeApiQueryFactory
                .newInstance(applicationKey);

And code throwing following Exception

  Exception in thread "main"  com.google.code.stackexchange.client.exception.InvalidApplicationKeyException: The 'key' query parameter containing your application's public key is missing or invalid.
at 
com.google.code.stackexchange.client.impl.StackExchangeApiGateway.createStackOve
rflowApiClientException(StackExchangeApiGateway.java:390)
at 
com.google.code.stackexchange.client.impl.StackExchangeApiGateway.callApiMethod(
StackExchangeApiGateway.java:271)
at 
com.google.code.stackexchange.client.impl.StackExchangeApiGateway.callApiMethod(
StackExchangeApiGateway.java:233)
at 
com.google.code.stackexchange.client.query.impl.BaseStackOverflowApiQuery.list(B
aseStackOverflowApiQuery.java:142)
... 3 more

really don't know what wrong with it. Is applicationkey different from key 
which i got with registration.

Original issue reported on code.google.com by sanjiv.i...@gmail.com on 29 Oct 2013 at 8:46

GoogleCodeExporter commented 8 years ago
I am getting the same exception.Did you get any solution to this problem?

Original comment by lipika.n...@gmail.com on 15 Jan 2014 at 11:08