getting 401 while making curl call to ning - Build2024-03-29T00:03:52Zhttp://build.ning.com/forum/topics/getting-401-while-making-curl-call-to-ning?commentId=6308082%3AComment%3A16551&xg_source=activity&feed=yes&xn_auth=noClarification: you should rep…tag:build.ning.com,2012-05-07:6308082:Comment:165602012-05-07T18:56:19.029ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>Clarification: you should replace [YOUR_NETWORK] with the *subdomain* of your network, not the network name. So if your network is asdfasdfasdf.ning.com, you should be hitting this URL: <a href="https://external.ningapis.com/xn/rest/asdfasdfasdf/1.0/Token?xn_pretty=true" target="_blank">https://external.ningapis.com/xn/rest/asdfasdfasdf/1.0/Token?xn_pretty=true</a></p>
<p>Clarification: you should replace [YOUR_NETWORK] with the *subdomain* of your network, not the network name. So if your network is asdfasdfasdf.ning.com, you should be hitting this URL: <a href="https://external.ningapis.com/xn/rest/asdfasdfasdf/1.0/Token?xn_pretty=true" target="_blank">https://external.ningapis.com/xn/rest/asdfasdfasdf/1.0/Token?xn_pretty=true</a></p> Sorry, accidentally posted th…tag:build.ning.com,2012-05-05:6308082:Comment:165512012-05-05T00:06:17.024ZPhillip Pearsonhttp://build.ning.com/profile/PhillipPearson
<p>Sorry, accidentally posted this as the Build Team account rather than my own login. Send messages my way, not to Build Team. Thanks!</p>
<p>Sorry, accidentally posted this as the Build Team account rather than my own login. Send messages my way, not to Build Team. Thanks!</p> Looks like there are a couple…tag:build.ning.com,2012-05-05:6308082:Comment:166572012-05-05T00:05:09.489ZBuild Teamhttp://build.ning.com/profile/BuildTeam
<p>Looks like there are a couple of issues with your command line there:</p>
<p></p>
<p>- curl's -u parameter just takes a username, not a password.</p>
<p></p>
<p>- you're trying to get a token on design.ning.com, not your own network.</p>
<p></p>
<p>Note also that the signature should be [CONSUMER_SECRET]%26, seeing as you're using the PLAINTEXT method.</p>
<p></p>
<p>Try this instead:</p>
<p></p>
<p>curl -u [USERNAME] -d…</p>
<p>Looks like there are a couple of issues with your command line there:</p>
<p></p>
<p>- curl's -u parameter just takes a username, not a password.</p>
<p></p>
<p>- you're trying to get a token on design.ning.com, not your own network.</p>
<p></p>
<p>Note also that the signature should be [CONSUMER_SECRET]%26, seeing as you're using the PLAINTEXT method.</p>
<p></p>
<p>Try this instead:</p>
<p></p>
<p>curl -u [USERNAME] -d 'oauth_signature_method=PLAINTEXT&oauth_consumer_key=[CONSUMER_KEY]&oauth_signature=[CONSUMER_SECRET]%26' <a rel="nofollow" href="https://external.ningapis.com/xn/rest/design/1.0/Token?xn_pretty=true">https://external.ningapis.com/xn/rest/[YOUR_NETWORK]/1.0/Token?xn_pretty=true</a></p>
<p></p>
<p>If this doesn't work, send me a private message here with the full command line, including the key/secret/username, and I'll take a look.</p>