# Using Node-Red with Cloudant - Credential Issue

**URL:** <https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470>\
**Category:** General\
**Created:** [8 October 2019 13:35 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470 "2019-10-08T13:35:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJR](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MJR](https://discourse.nodered.org/u/MJR)\
**Post date:** [8 October 2019 13:35 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470/1 "2019-10-08T13:35:53Z")

</div>

Hi there,

I'm working with Node-Red and Cloudant, trying to put data into a Cloudant database file. Using the _node-red-node-cf-cloudant_ nodes.  
This works fine with the two running in the same cloud, with the database being automatically detected by Node-Red, but when I try to use the host, username and password from the service credentials, I get the error

```auto
TypeError: Cannot read property 'match' of null

```

I've also tried my personal IBM Cloud credentials to no avail. My end goal is to have Node-Red running locally on a Beaglebone Black computer, sending sensor data to a Cloudant database hosted in the cloud.  
I'd really appreciate any help.

Regards,

Max

---

<div class="post-metadata">

**Author:** ![miker256](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miker256/32/13042_2.png) [@miker256](https://discourse.nodered.org/u/miker256)\
**Post date:** [12 October 2019 00:26 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470/2 "2019-10-12T00:26:08Z")

</div>

> <https://stackoverflow.com/questions/57359438/can-not-read-property-match-of-null>

---

<div class="post-metadata">

**Author:** ![MJR](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MJR](https://discourse.nodered.org/u/MJR)\
**Post date:** [21 October 2019 07:36 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470/3 "2019-10-21T07:36:12Z")

</div>

Sorry for the late response. Thanks for linking this.  
I found out it was an issue with security and TLS needing to be set up for remote cloud connections.  
By setting TLS Optional in my instance of Watson IoT, I have resolved the problem. Of course this is only for development purposes and for any production it will have to be set up properly. I have also found that I have needed to use _node-red-contrib-ibm-watson-iot_ nodes to write to the cloud from my device, and _node-red-contrib-scx-ibmiotapp_ when reading from the cloud to send data from Watson to a Cloudant database.

---

<div class="post-metadata">

**Author:** ![dianadujing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dianadujing/32/27797_2.png) [@dianadujing](https://discourse.nodered.org/u/dianadujing)\
**Post date:** [27 August 2020 07:08 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470/4 "2020-08-27T07:08:28Z")

</div>

Hi Max,

Thank you for sharing your solution here.  
I found the same issue with you. My question is how to set TLS Optional in Watson IoT instance. Or should I set up TLS optional on Cloudant?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [27 September 2020 11:18 UTC](https://discourse.nodered.org/t/using-node-red-with-cloudant-credential-issue/16470/5 "2020-09-27T11:18:37Z")

</div>

I have the same problem
