apibasecamp

New basecamp api tells me there's no basecamp account at this address


I'm new to basecamp api, and while trying out the simplest example:

curl -u user:pass -H 'User-Agent: MyApp (yourname@example.com)' https://basecamp.com/999999999/api/v1/projects.json

I got the error says:

There's no Basecamp account at this address. Sign in to Launchpad to see your accounts.

I replaced the user with my basecamp email address, and the pass as the password.Am I putting something wrong?

Thanks in advance!


Solution

  • You have to specify user-agent either your email address or app name, in my opinion input your email address and mention your basecamp account id (after login in basecamp account, id shows on url in number form )

    example :
    curl -u xyz@example.com:xxxxxx -H 'User-Agent: xyz@example.com' https://basecamp.com/1213136/api/v1/projects.json
    

    And finally you get your json!!