403 Developer Inactive?

51 views
Skip to first unread message

Darrell Berry

unread,
Sep 9, 2009, 12:02:30 PM9/9/09
to contextvoice-dev
Can't get addition of new URLs to work -- been banging my head on this
in Java and kept getting a 403 response code, so thought I'd try it
using your sample Python code (from
http://developer.contextvoice.com/docs/api_methods_version_12/Add_an_URL)

With my current API key I just get:

403 Developer Inactive

What's that mean, then? I can certainly use my key to retrieve
results, just seeming not add new URLs, and under My Account, this key
is listed as Active...

help?!

thanks

Dan Ciotu

unread,
Sep 9, 2009, 12:47:25 PM9/9/09
to contextv...@googlegroups.com
Hi Darrell,

Please take a lot at this post maybe you'll find the fix right there:

http://groups.google.com/group/contextvoice-dev/browse_thread/thread/5b9024943d50b22b

If not, e-mail me the code and I'll try to see what's wrong.

Best,
Dan

Darrell Berry

unread,
Sep 9, 2009, 12:53:40 PM9/9/09
to contextvoice-dev
Well I THINK I'm doing it right... here's an interactive python
session (have checked the apikey is correct!)

>>> import urllib
>>>
... api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
>>>
... # Post a single resource, xml response (which is default):
... url = 'http://www.ubervu.com'
>>> get_resource_url = 'http://api.contextvoice.com/1.2/resources/?apikey=%s' % api_key
>>> data = 'url=%s' % urllib.quote(url)
>>> urllib.urlopen(get_resource_url, data=data).read()
'<h1>403 Developer Inactive</h1>'

and here's my java code which in a much more long-winded, java-ey way,
gets me also to a 403:

public void submitUrlForTracking(URL sourceURL, Configuration prefs) {

URL queryURL = null;

try {

queryURL = new URL(
"http://api.contextvoice.com/1.2/resources/?apikey="
+ licenseID);

} catch (MalformedURLException e2) {
logger.error("Malformed URL");

}

HttpURLConnection uc;

try {

String command = URLEncoder.encode("url", "UTF-8") + "="
+ URLEncoder.encode(sourceURL.toString(), "UTF-8");

logger.trace(queryURL);
logger.trace(command);

uc = (HttpURLConnection) queryURL.openConnection();

uc.setDoOutput(true);
uc.setUseCaches(false);
uc.setAllowUserInteraction(false);

uc.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
uc.setRequestMethod("POST");
uc.setRequestProperty("Content-length", Integer.toString(command
.length()));

DataOutputStream out = new DataOutputStream(uc.getOutputStream());

out.writeBytes(command);

out.flush();
out.close();

logger.trace(uc.getResponseCode() + " : " + uc.getResponseMessage
());

} catch (IOException e2) {
e2.printStackTrace();
}

}

Any insight much appreciated!

d


On Sep 9, 5:47 pm, Dan Ciotu <dan.ci...@gmail.com> wrote:
> Hi Darrell,
>
> Please take a lot at this post maybe you'll find the fix right there:
>
> http://groups.google.com/group/contextvoice-dev/browse_thread/thread/...
>
> If not, e-mail me the code and I'll try to see what's wrong.
>
> Best,
> Dan
>

Dan Ciotu

unread,
Sep 9, 2009, 1:33:11 PM9/9/09
to contextv...@googlegroups.com
When posting resources that already exist (for example http://www.ubervu.com already exists in our system), we return a 302 redirect to the URL where you can find the reactions for that specific resource.

So you have to check the headers of the response first.

If you're still having issues, let me know.

Best regards,
Dan

Darrell Berry

unread,
Sep 9, 2009, 3:02:55 PM9/9/09
to contextvoice-dev
Yeah no sign of a 302, just the 403s I've reported, even for new URLs
that are extremely unlikely to have been axes by others. Happy to let
u play with my code plus my apikey if u want?

On Sep 9, 6:33 pm, Dan Ciotu <dan.ci...@gmail.com> wrote:
> When posting resources that already exist (for examplehttp://www.ubervu.comalreadyexists in our system), we return a 302
> redirect to the URL where you
> can find the reactions for that specific resource.
>
> So you have to check the headers of the response first.
>
> If you're still having issues, let me know.
>
> Best regards,
> Dan
>

Darrell Berry

unread,
Sep 10, 2009, 5:59:04 AM9/10/09
to contextvoice-dev
Oh hang on. Think I've got it working in Java -- still don't
understand (and would like to) what Developer Inactive means as as
error status tho!

d

On Sep 9, 8:02 pm, Darrell Berry <darrell.be...@gmail.com> wrote:
> Yeah no sign of a 302, just the 403s I've reported, even for new URLs
> that are extremely unlikely to have been axes by others. Happy to let
> u play with my code plus my apikey if u want?
>
> On Sep 9, 6:33 pm, Dan Ciotu <dan.ci...@gmail.com> wrote:
>
> > When posting resources that already exist (for examplehttp://www.ubervu.comalreadyexistsin our system), we return a 302

Dan Ciotu

unread,
Sep 10, 2009, 6:01:36 AM9/10/09
to contextv...@googlegroups.com
When doing the redirect, your API key is not sent so basically the call is not valid.

Its purpose is for you to find out the URL where the reactions can be found for the specified link.

You need to add your API key to that URL in order to work.

Best,
Dan

Darrell Berry

unread,
Sep 10, 2009, 6:19:09 AM9/10/09
to contextvoice-dev
ah ok that makes sense -- thanks

On Sep 10, 11:01 am, Dan Ciotu <dan.ci...@gmail.com> wrote:
> When doing the redirect, your API key is not sent so basically the call is
> not valid.
>
> Its purpose is for you to find out the URL where the reactions can be found
> for the specified link.
>
> You need to add your API key to that URL in order to work.
>
> Best,
> Dan
>
> On Thu, Sep 10, 2009 at 12:59 PM, Darrell Berry <darrell.be...@gmail.com>wrote:
>
>
>
> > Oh hang on. Think I've got it working in Java -- still don't
> > understand (and would like to) what Developer Inactive means as as
> > error status tho!
>
> > d
>
> > On Sep 9, 8:02 pm, Darrell Berry <darrell.be...@gmail.com> wrote:
> > > Yeah no sign of a 302, just the 403s I've reported, even for new URLs
> > > that are extremely unlikely to have been axes by others. Happy to let
> > > u play with my code plus my apikey if u want?
>
> > > On Sep 9, 6:33 pm, Dan Ciotu <dan.ci...@gmail.com> wrote:
>
> > > > When posting resources that already exist (for
> > examplehttp://www.ubervu.comalreadyexistsinour system), we return a 302
> > > > redirect to the URL where you
> > > > can find the reactions for that specific resource.
>
> > > > So you have to check the headers of the response first.
>
> > > > If you're still having issues, let me know.
>
> > > > Best regards,
> > > > Dan
>
> > > > On Wed, Sep 9, 2009 at 7:53 PM, Darrell Berry <darrell.be...@gmail.com
> > >wrote:
>
> > > > > Well I THINK I'm doing it right... here's an interactive python
> > > > > session (have checked the apikey is correct!)
>
> > > > > >>> import urllib
>
> > > > > ... api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
>
> > > > > ... # Post a single resource, xml response (which is default):
> > > > > ... url = 'http://www.ubervu.com'
> > > > > >>> get_resource_url = '
> > > > >http://api.contextvoice.com/1.2/resources/?apikey=%s'%api_key<http://api.contextvoice.com/1.2/resources/?apikey=%s%27%api_key>
Reply all
Reply to author
Forward
0 new messages