converting code from Postman to Domo

I have managed to write a connector for Akamai however now need to convert it into Domo i.e. change variable names eg. is there any guide or tool for this as ther eare some parts Im not sure about i.e. where its making requests withi Postman that are obviously not relevant wihin Domo.

Comments

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    @Simon_King  i assume you're trying to create a custom connector?

     

    https://developer.domo.com/docs/custom-connectors/connector-dev-studio

     

    takes a hot minute to get into the tutorial section, but i wrote an article to build a spotify connector from scratch:

    https://www.linkedin.com/pulse/enrich-your-domo-projects-custom-connectors-includes-20-wilson/

  • Thanks this is a handy guide however I have already built multiple connectors but always built them directly in Domo. In this situation I have got this working in Postman but now needto convert the code, its this convertion I am after help with.  I know that Domo recommend using Postman so was wondering if they have any convertion guides/Tools.

     

  • I think that part of this, I need to include the 'signing algorithm moniker' being used i.e. if this was using EdgeGrid V1, hash message authentication code, SHA–256 as the hash standard it would be "EG1-HMAC-SHA256".

     

    Do we kniow what the DOMO Library uses?

  • I think the crux is around my interpretation of the encoding steps:

     

    Postman function:

    // Generate Hash - Using sandbox CryptoJS library
    function generateHash(key,data) {
    var signature = CryptoJS.HmacSHA256(data, key);
    signature = signature.toString(CryptoJS.enc.Base64);
    return signature;
    }

     

    I have translated to Domo:

    // Generate Hash - Using DOMO library
    function generateHash(key,data) {
    var signed = DOMO.hmacSHA256(data, key);
    signature = DOMO.b64EncodeUnicode(signed);
    return signature;
    }

     

    Anyone spot anything wrong?

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    @Simon_King  I get that it looks like you're battling with authentication.  It's unclear to me where you want to apply this code.

     

    We have an IDE to facilitate connector development that simplifies authentication.  And similarly, if you're passing data to APIs inside a custom app, there's tooling in Domo java CLI that supports / simplifies authentication.

     

    I don't understand connector development well enough to troubleshoot code from scratch.  Support might be able / willing to help; however, if you're developing outside of the context of tools designed for the task, I can imagine support might be reluctant to engage and instead push you toward pro services.a

  • Hi,

     

    Still batling to create this connector. 

     

    The 3rd party require the Authorization header to start with the signing algorithm moniker (name of the algorithm) used to sign the request.

     

    I am using 'DOMO.hmacSHA256(data, key);' and declaring that this moniker is EdgeGrid by starting the header with  EG1-HMAC-SHA256.

     

    Do we know what the moniker actually is for Domo?