Skip to content

Instantly share code, notes, and snippets.

Avatar

Kirk Ouimet kirkouimet

View GitHub Profile
@kirkouimet
kirkouimet / CopyAsanaTasks.php
Last active Dec 18, 2015 — forked from mhdhejazi/CopyAsanaTasks.php
Allows you to duplicate a project in Asana and put it in another workspace
View CopyAsanaTasks.php
<?php
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null) {
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
You can’t perform that action at this time.