How do I call an external REST API after a diagflow has been completed?











up vote
1
down vote

favorite












I want to fire off a messaging API with payload after a successful dialogflow interaction. My JS is weak and need some assistance. For example, I want to send an SMS after a successful dialog flow interaction using this API end point:



https://developer.wavecell.com/v1/api-documentation/send-sms-single:



https://api.wavecell.com/sms/v1/{subAccountId}/single
HTTP POST:



{
"source": "Developer",
"destination": "+6512345678",
"clientMessageId": "MyBd00001",
"text": "Hello World",
"encoding": "AUTO",
"scheduled": "2016-11-03T08:24:20.332Z",
"expiry": "2016-11-03T18:24:20.332Z"
}



How would I write that in Inline Editor(Powered by Cloud Functions for Firebase)? I don't need a anything fancy ... just to call this API with its payload.



Thanks. An example code would suffice.










share|improve this question









New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
    – dmcgrandle
    Nov 18 at 5:33










  • from Firebase you can only hit external services if you have paid account.
    – Abhinav Tyagi
    Nov 19 at 9:48















up vote
1
down vote

favorite












I want to fire off a messaging API with payload after a successful dialogflow interaction. My JS is weak and need some assistance. For example, I want to send an SMS after a successful dialog flow interaction using this API end point:



https://developer.wavecell.com/v1/api-documentation/send-sms-single:



https://api.wavecell.com/sms/v1/{subAccountId}/single
HTTP POST:



{
"source": "Developer",
"destination": "+6512345678",
"clientMessageId": "MyBd00001",
"text": "Hello World",
"encoding": "AUTO",
"scheduled": "2016-11-03T08:24:20.332Z",
"expiry": "2016-11-03T18:24:20.332Z"
}



How would I write that in Inline Editor(Powered by Cloud Functions for Firebase)? I don't need a anything fancy ... just to call this API with its payload.



Thanks. An example code would suffice.










share|improve this question









New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
    – dmcgrandle
    Nov 18 at 5:33










  • from Firebase you can only hit external services if you have paid account.
    – Abhinav Tyagi
    Nov 19 at 9:48













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want to fire off a messaging API with payload after a successful dialogflow interaction. My JS is weak and need some assistance. For example, I want to send an SMS after a successful dialog flow interaction using this API end point:



https://developer.wavecell.com/v1/api-documentation/send-sms-single:



https://api.wavecell.com/sms/v1/{subAccountId}/single
HTTP POST:



{
"source": "Developer",
"destination": "+6512345678",
"clientMessageId": "MyBd00001",
"text": "Hello World",
"encoding": "AUTO",
"scheduled": "2016-11-03T08:24:20.332Z",
"expiry": "2016-11-03T18:24:20.332Z"
}



How would I write that in Inline Editor(Powered by Cloud Functions for Firebase)? I don't need a anything fancy ... just to call this API with its payload.



Thanks. An example code would suffice.










share|improve this question









New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I want to fire off a messaging API with payload after a successful dialogflow interaction. My JS is weak and need some assistance. For example, I want to send an SMS after a successful dialog flow interaction using this API end point:



https://developer.wavecell.com/v1/api-documentation/send-sms-single:



https://api.wavecell.com/sms/v1/{subAccountId}/single
HTTP POST:



{
"source": "Developer",
"destination": "+6512345678",
"clientMessageId": "MyBd00001",
"text": "Hello World",
"encoding": "AUTO",
"scheduled": "2016-11-03T08:24:20.332Z",
"expiry": "2016-11-03T18:24:20.332Z"
}



How would I write that in Inline Editor(Powered by Cloud Functions for Firebase)? I don't need a anything fancy ... just to call this API with its payload.



Thanks. An example code would suffice.







dialogflow






share|improve this question









New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 19 at 7:15









sai.raj

697




697






New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 18 at 5:20









Charmaine Looi

62




62




New contributor




Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Charmaine Looi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
    – dmcgrandle
    Nov 18 at 5:33










  • from Firebase you can only hit external services if you have paid account.
    – Abhinav Tyagi
    Nov 19 at 9:48


















  • Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
    – dmcgrandle
    Nov 18 at 5:33










  • from Firebase you can only hit external services if you have paid account.
    – Abhinav Tyagi
    Nov 19 at 9:48
















Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
– dmcgrandle
Nov 18 at 5:33




Have you tried anything yet? If so, please show your code. StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to illustrate the specific problem you're having in a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the tour.
– dmcgrandle
Nov 18 at 5:33












from Firebase you can only hit external services if you have paid account.
– Abhinav Tyagi
Nov 19 at 9:48




from Firebase you can only hit external services if you have paid account.
– Abhinav Tyagi
Nov 19 at 9:48












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Response your intent with fullfilment feature but it needs firebase billable account such as Blaze plan to call an external API .
Refer this question.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Charmaine Looi is a new contributor. Be nice, and check out our Code of Conduct.










     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358131%2fhow-do-i-call-an-external-rest-api-after-a-diagflow-has-been-completed%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Response your intent with fullfilment feature but it needs firebase billable account such as Blaze plan to call an external API .
    Refer this question.






    share|improve this answer



























      up vote
      0
      down vote













      Response your intent with fullfilment feature but it needs firebase billable account such as Blaze plan to call an external API .
      Refer this question.






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        Response your intent with fullfilment feature but it needs firebase billable account such as Blaze plan to call an external API .
        Refer this question.






        share|improve this answer














        Response your intent with fullfilment feature but it needs firebase billable account such as Blaze plan to call an external API .
        Refer this question.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 19 at 3:20









        sai.raj

        697




        697










        answered Nov 18 at 8:51









        Non Brazilian

        137214




        137214






















            Charmaine Looi is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            Charmaine Looi is a new contributor. Be nice, and check out our Code of Conduct.













            Charmaine Looi is a new contributor. Be nice, and check out our Code of Conduct.












            Charmaine Looi is a new contributor. Be nice, and check out our Code of Conduct.















             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358131%2fhow-do-i-call-an-external-rest-api-after-a-diagflow-has-been-completed%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin