# How to access Atlassian Connect Express backend end points from frontend JS

**URL:** <https://community.developer.atlassian.com/t/how-to-access-atlassian-connect-express-backend-end-points-from-frontend-js/4193>\
**Category:** Atlassian Developer Tools\
**Tags:** atlassian-connect-dev, jira-cloud\
**Created:** [May 22, 2017, 8:46pm UTC](https://community.developer.atlassian.com/t/how-to-access-atlassian-connect-express-backend-end-points-from-frontend-js/4193 "2017-05-22T20:46:38Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![hariprasath](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/hariprasath/32/37018_2.png) [@hariprasath](https://community.developer.atlassian.com/u/hariprasath)\
**Post date:** [October 30, 2018, 11:41am UTC](https://community.developer.atlassian.com/t/how-to-access-atlassian-connect-express-backend-end-points-from-frontend-js/4193/6 "2018-10-30T11:41:08Z")

</div>

Hi @frederictardieu @daniel

In our connect add-on, have added the same code. But cannot access the data, as 401 error code is thrown when using addon.checkValidToken(). Here is my server side code,

```auto
app.get('/test', addon.checkValidToken(), function(req, res){
	....
});

```

and client side code,

```auto
$.ajax({
	type: "GET",
	url: "/test",
	dataType: "json",
	beforeSend: function (xhr) {
		xhr.setRequestHeader("Authorization", "JWT {{token}}");
	},
	success: function(data){
		alert("success");
	}
});

```

Already, I have posted a question [here](https://community.developer.atlassian.com/t/authenticating-url-on-server-side/24476). What changes has to be done here? Or how can I check jwt token using checkValidToken(). Thanks in advance.

---

_[View the full topic](https://community.developer.atlassian.com/t/how-to-access-atlassian-connect-express-backend-end-points-from-frontend-js/4193)._
