Programmatic access

16 views
Skip to first unread message

Rod Fitzsimmons Frey

unread,
May 27, 2010, 2:24:38 PM5/27/10
to PBwiki API Hackers
Hi, I'm trying to access the API programatically from a desktop app.
I'm able to log in with the user's creds and get back json containing
a cookiename, uid and token.

However, when I create a http request and set the Cookie header to
include the info, I have no joy.

I'm probably setting the cookie up correctly, but trial-and-error is
failing me. Here's the info I'm using:

login result:
{"_auth_role":false,"_auth_via":"cookie","_valid_as_of":
1274984452,"cookiename":"net_MYWORKSPACE_wss","token":"20_DIGIT_TOKEN","uid":"40_DIGIT_HEX_UID"}

Cookie I construct;
Cookie: net_MYWORKSPACE_wss=20_DIGIT_TOKEN;


What I get back:

{"_request_id":"11111","_valid_as_of":1274984542,"error_status":
403,"error_string":"unwanted input ''","reference":"http:\/\/
MYWORKSPACE.pbworks.com\/api_v2\/#GetRecentWikis"}

What am I misunderstanding or doing wrong?

Thanks!
Rod

Mark Christian

unread,
May 27, 2010, 4:03:46 PM5/27/10
to rod...@gmail.com, PBwiki API Hackers
Hi Rod;
Can you show me the URL you're sending to the server? It might have a trailing slash, which would lead to an error like that.

Best;
— Mark


--
You received this message because you are subscribed to the Google Groups "PBwiki API Hackers" group.
To post to this group, send email to pbwik...@googlegroups.com.
To unsubscribe from this group, send email to pbwiki-api+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pbwiki-api?hl=en.


Rod Fitzsimmons Frey

unread,
May 27, 2010, 8:05:25 PM5/27/10
to PBwiki API Hackers
Thanks! That was exactly it. Fantastic debugging-fu!

On May 27, 1:03 pm, Mark Christian <m...@pbworks.com> wrote:
> Hi Rod;
> Can you show me the URL you're sending to the server? It might have a
> trailing slash, which would lead to an error like that.
>
> Best;
> — Mark
>
> > pbwiki-api+...@googlegroups.com<pbwiki-api%2Bunsubscribe@googlegrou ps.com>
> > .
Reply all
Reply to author
Forward
0 new messages