I am getting a 401 error with message Invalid Password when I make a curl call to ning api.

curl -u [USERNAME]:[PASSWORD] \
> -d 'oauth_signature_method=PLAINTEXT&oauth_consumer_key=[CONSUMER_KEY]&oauth_signature=[OAUTH_SIGNATURE]' \
> https://external.ningapis.com/xn/rest/design/1.0/Token?xn_pretty=true

I am using the same username and password as I used to log into this account. I have also double checked for consumer key and consumer secret and they are both correct.

Thanks

Views: 342

Reply to This

Replies to This Discussion

Looks like there are a couple of issues with your command line there:

- curl's -u parameter just takes a username, not a password.

- you're trying to get a token on design.ning.com, not your own network.

Note also that the signature should be [CONSUMER_SECRET]%26, seeing as you're using the PLAINTEXT method.

Try this instead:

curl -u [USERNAME] -d 'oauth_signature_method=PLAINTEXT&oauth_consumer_key=[CONSUMER_KEY]&oauth_signature=[CONSUMER_SECRET]%26' https://external.ningapis.com/xn/rest/[YOUR_NETWORK]/1.0/Token?xn_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.

Sorry, accidentally posted this as the Build Team account rather than my own login.  Send messages my way, not to Build Team.  Thanks!

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: https://external.ningapis.com/xn/rest/asdfasdfasdf/1.0/Token?xn_pre...

Reply to Discussion

RSS

Blog Posts

Getting Started

Posted by Kyle Ford on October 13, 2010 at 8:00am 3 Comments

A Note on API Pricing

Posted by Phil McCluskey on October 1, 2010 at 8:55am 0 Comments

Welcome to Build!

Posted by Kyle Ford on September 30, 2010 at 8:30pm 1 Comment

Ning Status

© 2024   Created by Build Team.   Powered by

Badges  |  Report an Issue  |  Terms of Service