# AP.context.getToken doesn't work for certain module types

**URL:** <https://community.developer.atlassian.com/t/ap-context-gettoken-doesnt-work-for-certain-module-types/40308>\
**Category:** Jira Cloud\
**Tags:** jwt, atlassian-connect-dev\
**Created:** [July 26, 2020, 1:06pm UTC](https://community.developer.atlassian.com/t/ap-context-gettoken-doesnt-work-for-certain-module-types/40308 "2020-07-26T13:06:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david2](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/david2/32/36218_2.png) [@david2](https://community.developer.atlassian.com/u/david2)\
**Post date:** [July 26, 2020, 1:06pm UTC](https://community.developer.atlassian.com/t/ap-context-gettoken-doesnt-work-for-certain-module-types/40308/1 "2020-07-26T13:06:37Z")

</div>

It looks like AP.context.getToken doesn’t work from workflow extension configuration pages (e.g. workflow validator configuration pages). When you can AP.context.getToken from such a page, it logs an error in the browser console:  
`ACJS: content resolver failed to get context jwt token`  
and on the Network tab, it shows that the HTTP call that it makes to the Jira instance fails with a 404 error for this request:  
`https://jmwe-dev-local.atlassian.net/plugins/servlet/ac/com.innovalog.mwec/LinkedIssuesValidator`

This is a blocker for us, as this means we cannot get a fresh JWT token from our configuration pages, which forces us to use the initial JWT token and significantly increase the token TTL, which is a major security issue.

We haven’t checked _all_ module types yet, but I think Atlassian should test them all - and fix them all!

@dmorrow can you please look into this?

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![david2](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/david2/32/36218_2.png) [@david2](https://community.developer.atlassian.com/u/david2)\
**Post date:** [July 26, 2020, 1:10pm UTC](https://community.developer.atlassian.com/t/ap-context-gettoken-doesnt-work-for-certain-module-types/40308/2 "2020-07-26T13:10:09Z")

</div>

I have created [[ACJIRA-2176] - Ecosystem Jira](https://ecosystem.atlassian.net/browse/ACJIRA-2176) for this.

---

<div class="post-metadata">

**Author:** ![dmorrow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/dmorrow/32/35895_2.png) [@dmorrow](https://community.developer.atlassian.com/u/dmorrow)\
**Post date:** [July 27, 2020, 3:00am UTC](https://community.developer.atlassian.com/t/ap-context-gettoken-doesnt-work-for-certain-module-types/40308/3 "2020-07-27T03:00:17Z")

</div>

Hi @david2,

I have brought this to the attention of the Jira Cloud ecosystem team so hopefully they might be able to address this.

As a side note, when we introduced cacheable app iframes, we didn’t document the locations that support the context module. I’ve created [[ACJS-1141] - Ecosystem Jira](https://ecosystem.atlassian.net/browse/ACJS-1141) to fix this.

Regards,  
Dugald
