Hi.
It looks like have a typo in `self.endpoint` where you have a `/`
after the question mark.
Also, you shouldn't strip the bitly link to get the hash, use the full
link as the shortUrl argument. It's not clear to me, but you may be
putting the values in both the request body (ie: `params)` and in the
URL. You should only put them in the url.
`self.base_url + '/v3/info?' +
urllib.urlencode(dict=access_token=self.access_token
shortUrl=shortUrl)`
--
Jehiah
--
Jehiah
On Wed, Mar 20, 2013 at 8:16 AM, <
bentba...@gmail.com> wrote:
> Heya,
>
> How do I deal with this error: MISSING_ARG_LOGIN ? I am a real beginner with
> scripting and the like, but I have a python script that connects, and gets
> link_history, user_network_history, and user_info successfully.
>
> But now I have added a method to get info from /v3/info, I can't figure out
> why the call doesn't work.
>
> The method looks like this:
>
>>> def link_info(self, bithash, shortUrl):
>>>
>>> 39 if shortUrl == None or bithash == None:
>>>
>>> 40 return "Must supply
bit.ly hash & shortUrl to call
>>> link_info"
>>>
>>> 41 request_string = "&shortUrl=http%3A%2F%2Fbit.ly%2F"
>>>
>>> 42 payload = dict()
>>>
>>> 43 payload["hash"] = bithash
>>>
>>> 44 payload["shortUrl"] = shortUrl
>>>
>>> 45 self.endpoint = "/v3/info?/access_token="
>>>
>>> 46 data = requests.get(self.base_url + self.endpoint +
>>> self.access_token + request_string + bithash, params=payload)
>>>
>>> 47 return data
>
>
> So I get my
bit.ly link from my link_history method, strip it for the hash
> and then call this link_info method. All I seem to get is MISSING_ARG_LOGIN
>
> What am I doing wrong here?
>
> Cheers!
>
>
>
> --
> --
> You are subscribed to the
bit.ly API discussion group.
> To post, email to
bitl...@googlegroups.com
> For more options, visit
http://groups.google.com/group/bitly-api
>
> ---
> You received this message because you are subscribed to the Google Groups
> "bitly API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
bitly-api+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>