403 error - Forbidden when adding URL

12 views
Skip to first unread message

AndyM

unread,
Jun 21, 2010, 6:06:06 AM6/21/10
to contextvoice-dev
Hi. I am following the instructions on http://developer.contextvoice.com/wiki/4-2-add-a-url
to add a URL but when I try to post the URL through I receive a 403
error with the message saying "forbidden". I have an API key so I am
not quite sure what is forbidden or why I can't add the URL.

Any help appreciated.

Dan

unread,
Jun 21, 2010, 8:19:24 AM6/21/10
to contextvoice-dev
Hi Andy,

Can you post how you are performing the request? Tried it out with
another api key and it was working.

On Jun 21, 1:06 pm, AndyM <amp.mi...@gmail.com> wrote:
> Hi. I am following the instructions onhttp://developer.contextvoice.com/wiki/4-2-add-a-url

AndyM

unread,
Jun 21, 2010, 8:39:16 AM6/21/10
to contextvoice-dev
Thanks for the prompt reply Dan. I am making the call through Flex but
I don't have any problems with other web services, including searching
across ContextVoice. Here is the bulk of the code though:

var variables:URLVariables = new URLVariables();
var resourceURL:String = "http://api.contextvoice.com/1.2/resources/";
variables.url = "http://www.bbc.co.uk";
variables.apikey = "<my key>";
var urlReq:URLRequest = new URLRequest(resourceURL);
var loader:URLLoader = new URLLoader();
urlReq.data = variables;
urlReq.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, processData);

This code runs but it doesn't complete the event (call processData)
due to the 403 error.

I was wondering if there was a problem with my API key that doesn't
allow it to work across reactions, etc?

Many thanks.

bogdan.sandulescu

unread,
Jun 21, 2010, 10:07:14 AM6/21/10
to contextvoice-dev
Hi Andy,

Try this in your console/terminal:

curl http://api.contextvoice.com/1.2/resources/?apikey=<YOUR-APIKEY> -
durl=http://www.bbc.co.uk

Tried it out with your api key and received:

<info message="Resource found." url="/1.0/resources.xml/?url=http://
www.bbc.co.uk/" />

I am not familiar with Flex, but can you try to perform the same
example in another language?

bogdan.sandulescu

unread,
Jun 21, 2010, 10:08:10 AM6/21/10
to contextvoice-dev
You can also send the apikey argument as a POST variable. That
shouldn't be the issue.

On Jun 21, 5:07 pm, "bogdan.sandulescu" <bogdan...@gmail.com> wrote:
> Hi Andy,
>
> Try this in your console/terminal:
>
> curlhttp://api.contextvoice.com/1.2/resources/?apikey=<YOUR-APIKEY> -
> durl=http://www.bbc.co.uk
>
> Tried it out with your api key and received:
>
> <info message="Resource found." url="/1.0/resources.xml/?url=http://www.bbc.co.uk/" />

AndyM

unread,
Jun 21, 2010, 4:50:35 PM6/21/10
to contextvoice-dev
Hi. Thanks for your continued help. I tried what you suggested below
(this time using www.direct.gov.uk site but I get the exact same error
message (403 - message:forbidden) in Terminal.

Help please.

bogdan.sandulescu

unread,
Jun 21, 2010, 5:28:15 PM6/21/10
to contextvoice-dev
Hi Andy,

I don't think there is a problem with the url that you are submitting.
I'll ping you with an email to work closely with you to solve this
issue.

On Jun 21, 11:50 pm, AndyM <amp.mi...@gmail.com> wrote:
> Hi. Thanks for your continued help. I tried what you suggested below
> (this time usingwww.direct.gov.uksite but I get the exact same error
Reply all
Reply to author
Forward
0 new messages