Requesting url inside vs outside the browser

45 views
Skip to first unread message

Eric Foster

unread,
Oct 14, 2012, 5:14:44 AM10/14/12
to producteev-...@googlegroups.com
Hi,

To start, I am a coding noob. I'm trying to make a Producteev extension for my favorite app launcher, Alfred. I'm starting with a php file that I execute through the command line using 'php -f myscript.php' because that's how Alfred extensions execute script files. 

Anyway, using this method, I'm able to successful obtain a token but when I try to perform something more advanced like curling in the php file or through the command line the url  '/tasks/my_tasks.xml?api_key=11111111api_sig=111111', I get a 403 - Forbidden error and the message "Wrong api_key or signature" from Producteev. What's odd is when I open the same url in my browser, it works.

I've attached my code. Thanks in advance. 

myscript.php

aric lasry

unread,
Oct 15, 2012, 1:21:45 PM10/15/12
to Eric Foster, producteev-...@googlegroups.com
Hi. 
I just took a look at your script and I see that you are missing the token parameter in your request. 

Let me know if works. Thanks.
--
Aric LASRY | Co-founder & Lead dev @Producteev.com | 00 (1) 646 705 1274 | New York City

Eric Foster

unread,
Oct 17, 2012, 2:29:16 PM10/17/12
to producteev-...@googlegroups.com, Eric Foster
Hi Aric,

Thanks for getting back to me. I tried both with and without the token appended to the url and with and without a token in the params array used to generate the md5 sig. Nothing seems to work. I did notice that I've been returning the same token form the API since I started working on this project last week. 

Is that normal? 
Reply all
Reply to author
Forward
0 new messages