Question

So I'm trying to make use of the Basecamp API. The new one located here: https://github.com/basecamp/bcx-api

So I see a similar question that was asked here on SO:

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

I tried to follow the example, including reading the comments, but it's not working for me. In particular, this comment on the accepted answer:

This is basecamp account id, as you can see this unique id in url after login in basecamp account

Normally when I login to basecamp, I login here:

https : // myclientname dot basecamphq dot com/login.

When I login, it redirects me to

https : // myclientname dot basecamphq.com/clients.

When I am logged into the web interface from there, I can go to a "My Info" link at the top right and there is a "Token for feed readers or the Basecamp API" listed.

But.. I don't have a client id in the url? I tried all kinds of combinations, and nothing worked. Here are some examples of what I tried (using correct values):

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://myclientname.basecamphq.com/api/v1/projects.json`

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://basecamp.com/myclientname/api/v1/projects.json

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://basecamp.com/mytokenhere/api/v1/projects.json


curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://myclientname.basecamphq.com/mytokenhere/api/v1/projects.json

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://myclientname.basecamphq.com/myclientname/api/v1/projects.json

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://basecamphq.com/myclientname/api/v1/projects.json

These things are just giving me regular html responses saying stuff like "no basecamp account at this address" or "Oops, that isn't right. You may have typed the URL incorrectly[..]" or sometimes curl returns "curl: (51) SSL peer certificate or SSH remote key was not OK" (like in the last attempt shown)

Soo.. what am I doing wrong here?

edit

I did notice when I log into the basecamphq.com web interface, there are some meta tags at the top of the page (from view-source)

That look like this:

<meta name='current-user' content=1234567>
<meta name='current-identity' content=12345>
<meta name='current-account' content=123456>

I also tried stuff with the current-identity and current-account but those didn't work either, just kept giving me the same messages. e.g.

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://myclientname.basecamphq.com/123456/api/v1/projects.json

curl -u myuser:mypass -H 'User-Agent: MyApp (my@email.com)' https://basecamp.com/123456/api/v1/projects.json
Was it helpful?

Solution

If your url looks like https://mycompany.basecamphq.com/, then you should use the Basecamp Classic API - you'll find the docs here.

Using the API at https://github.com/basecamp/bcx-api is for accounts using the newer version of Basecamp we introduced on March 6th, 2012. Your url would look like https://basecamp.com/1234567 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top