How To Pass Basic Auth In Eventing Curl Request At Eventing


How can I add basic auth in eventing curl request

function OnUpdate(doc, meta) {
    var response=
    log("Doc created/updated", doc.productId);    
    catch (e) {
        log("cURL products request had an exception:",e)



You need to setup the URL as a “binding” in the function and then reference that from the curl call: cURL | Couchbase Docs. This is a bit of forced security to segregate credentials from the code and only allow pre-defined endpoints being called.

And for Capella specifically: Manage Eventing Functions and Settings | Couchbase Docs.

I dont see binding in eventing edit because of I never scroll down :slight_smile:

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