Google Extension and Asana



Hello All. I create new extension for Google Chrome how can create strict description task. But i faced with problem authorization. I not have domains for Redirect and App Url. How I can authorize user from Google Extension? Thanks!


Rather than doing your own authentication, why don’t you just grab the user’s current authentication cookie from the browser; this is what the original Asana Chrome extension is doing:


It’s some help for me, I can get data for self user, but i can’t create task (Send post request) their told me what i’m not authorized. Maybe I’m doing something wrong?


I would take a look at the complete code for the Chrome extension I linked to - it has the capability to add a task so that means it’s doing the same thing you’re trying to do.


When I send POST request, i get error 401, when I not authorized. If I send GET request, I’m get data about me.
I can use asana extension code and remake under self, but I want get understand how it works. Thanks.

Here is my example code:
// manifest.json
“manifest_version”: 2,
“version”: “0.0.1”,
“name”: “Create Ticket App”,
“description”: “Create ticket for asana”,
“author” : “Vladislav”,
“browser_action”: {
“default_popup”: “index_popup.html”
“permissions”: [
“icons”: {
“16”: “./images/16x16.png”,
“24”: “./images/24x24.png”,
“48”: “./images/48x48.png”,
“64”: “./images/64x64.png”,
“128”: “./images/128x128.png”
“content_security_policy”: “script-src ‘self’; object-src ‘self’”

$(document).ready(function () {


$('.simple-btn').on('click', function (e) {

$('.create-task').on('click', function (e) {

    console.log(chrome.cookies.get({'url': '', 'name': 'ticket'}, function (cookie) {

        url:     '',
        data:    {
            workspace: 0,
            assignee:  0,
            name:      'hello world',
        success: function (response) {


function getUser() {
url: ‘’,
success: function (data) {
// var photo =;
var name =;
var email =;

        // $('.avatar').css({'background': 'url(' + photo + ')'});
        $('.profile-block > .name').text(name);
        $('.profile-block > .email').text(email);
    dataType: 'JSON',