# Google Extension and Asana

**URL:** <https://forum.asana.com/t/google-extension-and-asana/43381>\
**Category:** API & Developers\
**Tags:** authentication\
**Created:** [28 February 2019 11:55 UTC](https://forum.asana.com/t/google-extension-and-asana/43381 "2019-02-28T11:55:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vlad1](https://luna1.co/8d76cd.png) [@Vlad1](https://forum.asana.com/u/Vlad1)\
**Post date:** [28 February 2019 11:55 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/1 "2019-02-28T11:55:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [28 February 2019 14:44 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/2 "2019-02-28T14:44:30Z")

</div>

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:

> <https://github.com/Asana/Chrome-Extension-Example/blob/launch/api_bridge.js>

---

<div class="post-metadata">

**Author:** ![Vlad1](https://luna1.co/8d76cd.png) [@Vlad1](https://forum.asana.com/u/Vlad1)\
**Post date:** [1 March 2019 16:08 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/3 "2019-03-01T16:08:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [1 March 2019 16:50 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/4 "2019-03-01T16:50:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vlad1](https://luna1.co/8d76cd.png) [@Vlad1](https://forum.asana.com/u/Vlad1)\
**Post date:** [4 March 2019 08:45 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/5 "2019-03-04T08:45:48Z")

</div>

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”: [  
“cookies”,  
“storage”,  
“identity”,  
“_://_.asana.com/\*”  
],  
“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’ [https://app.asana.com](https://app.asana.com); object-src ‘self’”  
}

$(document).ready(function () {

```
getUser();

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

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

    console.log(chrome.cookies.get({'url': 'https://app.asana.com', 'name': 'ticket'}, function (cookie) {
            console.log(cookie);
        })
    );

    $.post({
        url: 'https://app.asana.com/api/1.0/tasks/',
        data: {
            workspace: 0,
            assignee: 0,
            name: 'hello world',
        },
        success: function (response) {
            console.log(response);
        }
    });
});

```

});

function getUser() {  
$.get({  
url: ‘[https://app.asana.com/api/1.0/users/me](https://app.asana.com/api/1.0/users/me)’,  
success: function (data) {  
console.log(data);  
// var photo = data.data.photo.image\_60x60;  
var name = data.data.name;  
var email = data.data.email;

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

```

}

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:08 UTC](https://forum.asana.com/t/google-extension-and-asana/43381/6 "2025-05-30T19:08:04Z")

</div>

Closed on 30 May 2025 19:08 UTC


