PHP Classes

Basecamp

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Basecamp  >  (Un) Subscribe thread alerts  
Subject:Basecamp
Summary:add Basecamp support with this patch to oauth_client.php
Messages:2
Author:David
Date:2014-01-31 23:54:01
Update:2014-03-17 10:32:57
 

  1. Basecamp   Reply   Report abuse  
Picture of David David - 2014-01-31 23:54:01
// paying back in a small way - in the switch section near line 1840

case 'Basecamp':
$this->oauth_version = '2.0';
$this->dialog_url = 'https://launchpad.37signals.com/authorization/new?type=web_server&client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&state={STATE}';
$this->offline_dialog_url = 'https://launchpad.37signals.com/authorization/new?type=web_server&client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&state={STATE}&access_type=offline&approval_prompt=force';
$this->access_token_url = 'https://launchpad.37signals.com/authorization/token?type=web_server';
break;
###
only tricky part above was the change in type from code to web_server - from their comments this requirement may not persist.

#####
Basecamp web app registration is:
integrate.37signals.com/

###

Can copy login_with_stocktwits.php and change the success page to:
$success = $client->CallAPI(
'https://launchpad.37signals.com/authorization.json',
'GET', array(), array('FailOnAccessError'=>true), $user);

#####
And of course at the top:
require('http.php');
require('oauth_client.php');

$client = new oauth_client_class;
$client->server = 'Basecamp';
$client->debug = true;

  2. Re: Basecamp   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-03-17 10:32:57 - In reply to message 1 from David
37Signals support was integrated in the latest release. Thank you for the support.