I am trying to create an app for Basecamp. I managed to connect and pull data using curl (Basecamp API using cURL and PHP). However this requires the users login data.
I would like to use OAuth2 with Basecamp as in https://github.com/37signals/api/blob/master/sections/authentication.md. Unfortunately there is 0 documentation on this and I couldnt find any sample code. I saw there are several OAuth2 libraries http://oauth.net/code/, but I have no idea what to do with them.
Can somebody please show me some php sample code of how I would authenticate a user using OAuth2 in php and than make a request to the Basecamp API?
Thank you very much in advance.
I recently had to implement OAuth 2.0 for our company. I was also browsing the web to try and find information on the topic. I came across these two websites, which helped alot.
OAuth 2.0 Implementation Example
Online Screencast
Hope this helps.
Related
I'm trying to implement Oauth2 server library into my fuelphp api. I've been following this tutorial and this one.
I understood and was able to complete the 2nd tutorial, but that doesn't deal with integrating OAuth into Fuelphp.
What I'm wondering, is how to integrate OAuth2 into my api, I just want to replicated a login? Has anyone any other tutorials on how to do this?
Where in my fuelphp directories do I put the Server/ token/ authorization code?
Thanks very much
FuelPHP uses OPauth under the hood and it's use is documented in the official Fuel docs
The server tokens, authorization codes, etc are stored in the opauth.php config file.
I'm building a web app which I would like to connect to Endomondo to retrieve the workouts.
I've seen some web applications doing this using what seems to be oAuth, however, I don't seem to be able to find the API documentation in the Endomondo site, what's more, the PHP libraries I've found on Github seem to require the Endomondo username and password, which doesn't seem to be the best option.
Does anyone know where can I get the documentation or at least some information about this API? I'm interested in the oAuth option if there's one, as I'd rather not ask for the username and password.
there is no opened official API or documentation from Endomondo team, and I didn't find any Oauth php lib.
But perhaps you can try get the Oauth info from this python lib to sync activities -> https://github.com/cpfair/tapiriik/blob/master/tapiriik/services/Endomondo/endomondo.py
Good luck.
I want to start developing a tool that runs daily via cron for getting daily analytical data from one channel, or video, etc.. through the "Youtube Analytics API". And not what is the best way to approach it.
I have read the documentation of Google and and I have several questions:
I created the project in the console (https://code.google.com/apis/console/) but I doubt what kind of application I have to choose when I create a Client ID (Web Application, Service Account or Installed aplplication).
What PHP library use?
It's a very new API and not much information.
In the Google GData site there is a warning about that "Most newer Google APIs Google Data APIs are not Google Data APIs." and in the google-api-php-client, no examples of this API.
What is the best method for authentication in a cron?
As you can see I am very confuse, can someone help me, please?
Thank you.
1) It will be an installed application unless you will run it in a web server.
2) Use the official library, add the ytanalytics php library. Samples: https://github.com/youtube/yt-samples-php
3) You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.
I am trying to connect to the Intuit Partner Platform to use the new AggCat API but I am struggling to get the Oauth Signature and SAML assertion setup to authenticate and use the API. I have looked at the PHP DevKit for QuickBooks as an example but I think that is a different authentication process anyway. Are there any examples of how to use PHP to authenticate and use the Intuit AggCat API?
Currently the only samples are for .Net, Java and Ruby.
https://ipp.developer.intuit.com/index.php?title=0010_Intuit_Partner_Platform/0020_Aggregation_%26_Categorization_Apps/0010_GettingStarted/0027_Call_the_Agg_%26_Cat_APIs
William
There is a PHP sample available on github, but I still have not been able to figure out how to get the SimpleSAMLPHP setup working. Here is a link to the sample on github: phpaggcat.
If anyone has more luck with the github sample using SimpleSAMLPHP and can generate a more complete answer, I would appreciate any tips on making it work.
Edit 08/04/2013
I looked at this again recently and got it working. See my answer here.
Even after lots of googling I could only find very basic and raw examples which are very difficult to understand. Can someone please help me in setting up OAuth server and client implementation in PHP?
Thanks in advance.
I've created a simple class in PHP for Google oAuth available here
I've also implemented other Facebook and Microsoft oAuth on other projects and they are similar but don't work exactly the same way. The differences I remember are:
Some require requests to be send by POST others by GET
Facebook doesn't send all replies in JSON format
You can read my small tutorial here, the site itself uses that class and oAuth login :)