1

I am building an oauth app to connect to Basecamp 3 API using PHP and following the documentation here.

https://github.com/basecamp/api/blob/master/sections/authentication.md

The request authorization url works fine

https://launchpad.37signals.com/authorization/new

but the token url produces a page not found

https://launchpad.37signals.com/authorization/token

I contacted Basecamp but didn't get a response. They do say they don't prioritize suppose issues with the API because so few of their customers use it.

Any ideas on what the correct url for getting tokens would be?

dairbhre
  • 25
  • 5
  • I just submitted an API question to them related to the confusing OAuth flow regarding the refresh tokens. Hope I hear something from them, didn't know it was low priority for their support team. – Arturo Jan 24 '20 at 23:29

1 Answers1

0

There are 4 steps:

Step 1: Choose a webhook service or build your own (which certainly takes more time). This will receive the authentication.

Step 2: Register your app within Basecamp. it'll give you the client key and secret key

Step 3: You need to make a GET call to the .../new address. You need to pass on the client key, secret key and redirect url. The API will send an 8-digit number to the Webhook. You need to retrieve that from the webhook.

Step 4: Make the same GET call to the .../token address. You'll pass the key in addition to all previous information in the header. Then you'll receive an access token.

Supposedly with this access token you should be able to activate all other API. I have not figure this part out.

Steven Tran
  • 26
  • 1
  • 7
  • Thanks Steven. I was able to get around the error I was seeing by just registering a new app with Basecamp. Then the token url worked without problems and I was in turn able to make API calls to various aspects to their application, passing the access token in each call. – dairbhre Feb 05 '19 at 08:01
  • Can you share how you pass the access token into the call to the API? I'm unable to move forward with this. – Steven Tran Feb 07 '19 at 03:40
  • Steven, I am doing this with a PHP curl call. Once I pass the 8 digit code to the webhook, Basecamp will send back a json array containing the access_token and refresh_token. You would need to store these in your application. Then when you make a curl call to the API you pass the access_token in your headers e.g. "Authorization: Bearer YOUR_ACCESS_TOKEN". The access_token will expire after some time and when that happens your api calls won't work. Then you pass the refresh token to the webhook to retrieve a new access_token. – dairbhre Feb 08 '19 at 04:49