# Best way to make AJAX request on Admin Controller

**URL:** <https://forum.shopware.com/t/best-way-to-make-ajax-request-on-admin-controller/87835>\
**Category:** Administration (EN)\
**Created:** [22. Mai 2021 um 19:53 UTC](https://forum.shopware.com/t/best-way-to-make-ajax-request-on-admin-controller/87835 "2021-05-22T19:53:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivam201312](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@shivam201312](https://forum.shopware.com/u/shivam201312)\
**Post date:** [22. Mai 2021 um 19:53 UTC](https://forum.shopware.com/t/best-way-to-make-ajax-request-on-admin-controller/87835/1 "2021-05-22T19:53:58Z")

</div>

Hi , i want to make AJAX request on admin controller from admin backend.  
fileName.html.twig

```auto
<button v-on:click="makeAjaxRequest">Click</button>

```

index.js

```auto
makeAjaxRequest(){
let header = {
 method:"POST",
headers:{"Content-Type":"application/json",Authorization:"Access token fetched from cookie"}
};
 fetch("url",header).then((data)=>{
console.log(data);
}).catch((error)=>{
console.log(error);
});
}

```

I think access token is valid for 10 min . After that i have to refresh a page or regenerate access token . What will be the best way to make ajax request ?  
i am trying to avoid access token handling .
