<p>I'm trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account.</p>

<p>I tested it from the command line like:</p>

<pre><code>wget -O - --no-check-certificate \
"https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&amp;description=test"
</code></pre>

<p>This works great.</p>

<p>I then wanted to create a bookmarklet in my firefox. I googled and found bits and pieces and ended up with:</p>

<pre><code>javascript:void(
    open('https://seconduser:password@api.del.icio.us/v1/posts/add?url='
          +encodeURIComponent(location.href)
          +'&amp;description='+encodeURIComponent(document.title),
          'delicious','toolbar=no,width=500,height=250'
        )
    );
</code></pre>

<p>But all that happens is that I get this from del.icio.us:</p>

<pre><code>&lt;?xml version="1.0" standalone="yes"?&gt;
&lt;result code="access denied" /&gt;
&lt;!-- fe04.api.del.ac4.yahoo.net uncompressed/chunked Thu Aug  7 02:02:54 PDT 2008 --&gt;  
</code></pre>

<p>If I then go to the address bar and press enter, it changes to:</p>

<pre><code>&lt;?xml version='1.0' standalone='yes'?&gt;
&lt;result code="done" /&gt;
&lt;!-- fe02.api.del.ac4.yahoo.net uncompressed/chunked Thu Aug  7 02:07:45 PDT 2008 --&gt;
</code></pre>

<p>Any ideas how to get it to work directly from the bookmarks?</p>

[{'answer_id': 4546, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 1, 'selected': False, 'text': '<p>Does calling the method twice work?</p>\n\n<p>Seems to me that your authentication is being approved after the content arrives, so then a second attempt now works because you have the correct cookies.</p>\n'}, {'answer_id': 6996, 'author': 'jj33', 'author_id': 430, 'author_profile': 'https://Stackoverflow.com/users/430', 'pm_score': 3, 'selected': True, 'text': "<p>Can you sniff the traffic to find what's actually being sent?  Is it sending any auth data at all and it's incorrect or being presented in a form the server doesn't like, or is it never being sent by firefox at all?</p>\n"}, {'answer_id': 12453, 'author': 'travis', 'author_id': 1414, 'author_profile': 'https://Stackoverflow.com/users/1414', 'pm_score': 1, 'selected': False, 'text': '<p>I\'d recommend checking out the <a href="http://www.iopus.com/imacros/firefox/" rel="nofollow noreferrer">iMacros addon for Firefox</a>. I use it to login to a local web server and after logging in, navigate directly to a certain page. The code I have looks like this, but it allows you to record your own macros:</p>\n\n<pre><code>VERSION BUILD=6000814 RECORDER=FX\nTAB T=1\nURL GOTO=http://10.20.2.4/login\nTAG POS=1 TYPE=INPUT:TEXT FORM=NAME:introduce ATTR=NAME:initials CONTENT=username-goes-here\nSET !ENCRYPTION NO\nTAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:introduce ATTR=NAME:password CONTENT=password-goes-here\nTAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:introduce ATTR=NAME:Submit&amp;&amp;VALUE:Go\nURL GOTO=http://10.20.2.4/timecard\n</code></pre>\n\n<p>I middle click on it and it opens a new tab and runs the macro taking me directly to the page I want, logged in with the account I specified.</p>\n'}, {'answer_id': 13585, 'author': 'svrist', 'author_id': 86, 'author_profile': 'https://Stackoverflow.com/users/86', 'pm_score': 2, 'selected': False, 'text': '<p>@travis Looks very nice! I will sure take a look into it. I can think of several places I can use that</p>\n\n<p>I never got round to sniff the traffic but found out that a php site on my own server with http-auth worked fine, so i figured it was something with delicious. I then created a php page that does a wget of the delicious api and everything works fine :)</p>\n'}]
['https://Stackoverflow.com/questions/4544', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/86/']