# Using ColdFusion to generate JWT token

**URL:** <https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425>\
**Category:** API and Webhooks\
**Created:** [November 8, 2020, 9:37pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425 "2020-11-08T21:37:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cphawander](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cphawander/32/13978_2.png) [@cphawander](https://devforum.zoom.us/u/cphawander)\
**Post date:** [November 8, 2020, 9:37pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/1 "2020-11-08T21:37:28Z")

</div>

I am wondering if anyone has experience using ColdFusion to generate JWT tokens? I found a CF library in [JWT.io](http://JWT.io) but frankly I am not familiar with github and am having trouble with the documentation.  
The documentation mentions installing the library using CommandBox or “Alternatively the git repository can be cloned into the desired directory.” Does this mean I can simply download the zip file and extract it to a directory of my choice? I’d like to think it’s that simple but the documentation doesn’t read that way. Then the documentation says, “Once the library has been installed, the core jwt component can be instantiated directly: jwt = new path.to.jwtcfml.models.jwt();”. Is this done at the command line in Windows? Is this a one time command? It’s just not very clear what needs to be done to “install” this library. If anyone can assist or is using some other ColdFusion solution I would very much appreciate some guidance.

Thanks.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 9, 2020, 10:26pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/2 "2020-11-09T22:26:42Z")

</div>

Hey @cphawander,

I’ll leave your post here in case our community has any suggestions. In the meantime, you might also consider checking out StackOverflow and some other similar resources for ColdFusion specific guidance, too.

Best,  
Will

---

<div class="post-metadata">

**Author:** ![cphawander](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cphawander/32/13978_2.png) [@cphawander](https://devforum.zoom.us/u/cphawander)\
**Post date:** [November 10, 2020, 11:02pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/3 "2020-11-10T23:02:04Z")

</div>

Thanks Will. Just an update on this. I have been able to generate base64urlencoded values for the header and payload in ColdFusion, creating a “header.payload” string. I have verified the result on the [JWT.io](http://JWT.io) decoder; it returns my header and payload information accurately. The next step is hashing the value using HMACSHA256 algorithm, but ColdFusion’s hmac function - hmac(data, secret, “HMACSHA256”) - does not give me the result I want. Any guidance or assistance would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 11, 2020, 8:44pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/4 "2020-11-11T20:44:57Z")

</div>

Hey @cphawander,

Glad to hear you were able to generate those values. In regards to the SHA256 algorithm in ColdFusion, I’d recommend checking out StackOverflow for ColdFusion specific guidance.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![cphawander](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cphawander/32/13978_2.png) [@cphawander](https://devforum.zoom.us/u/cphawander)\
**Post date:** [November 12, 2020, 6:16pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/5 "2020-11-12T18:16:09Z")

</div>

Will, I resolved my problem. Got everything to work. Thanks.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 13, 2020, 6:14pm UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/6 "2020-11-13T18:14:45Z")

</div>

I’m happy to hear it, @cphawander! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 14, 2020, 4:14am UTC](https://devforum.zoom.us/t/using-coldfusion-to-generate-jwt-token/35425/7 "2020-12-14T04:14:47Z")

</div>

Closed on December 14, 2020, 4:14am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
