dongxianghuan3587 2014-03-08 02:44
浏览 22
已采纳

basecamp api告诉我没有大本营帐户

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
  • 写回答

1条回答 默认 最新

  • dongluan0020 2014-03-08 12:51
    关注

    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 :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 ARIMA模型时间序列预测用pathon解决
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度
  • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对
  • ¥15 误删注册表文件致win10无法开启
  • ¥15 请问在阿里云服务器中怎么利用数据库制作网站
  • ¥60 ESP32怎么烧录自启动程序,怎么查看客户esp32板子上程序及烧录地址
  • ¥50 html2canvas超出滚动条不显示
  • ¥15 java业务性能问题求解(sql,业务设计相关)