locked
Windows store app - web callback URL RRS feed

  • Question

  • I am using an API that requires me to use a Callback URL to receive data from the API service. How do i hook this Callback URL to my windows store app , so the data that i received from the API service  goes directly to my app?
    Thursday, January 9, 2014 8:31 AM

Answers

  • You could, but it doesn't make sense to do it as a Windows Store app.  The callback needs to be a fixed IP address so as to receive the SMS messages originating from the service to which you're connecting.  A Store app will not have a fixed IP address in most cases.  It would be best if you set up a web service to receive the SMS messages from that service, then forward that message to the Store app with a background process that uses a ControlChannelTrigger to keep an open connection to the Web Server to receive an inbound SMS message.

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.sockets.controlchanneltrigger.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, January 10, 2014 6:23 PM
    Moderator
  • >Is there a way to run a web service on an old computer  i am not using?

    Yes, but putting it on the internet is probably a poor solution.

    >Also i already have a website. Is it possible to build the web service and upload to some directory on my website?

    Yes, although you might use a different directory.  And depending on what kind of site it is, you might not be able to deploy an ASP.NET web application there.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Friday, January 10, 2014 7:00 PM

All replies

  • Is the Callback URL supposed to be client-side or server-side?  In the case that it's supposed to client-side, there's no solution - it seems that the API is intended to be used by other websites.  For server-side, just make a call to that URL.  Perhaps you can explain exactly how it intended to work. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 9, 2014 1:04 PM
    Moderator
  • I was reading this webpage: https://docs.nexmo.com/index.php/sms-api/handle-inbound-message

    I intend to use the API service for receiving SMS messages.  I need to somehow get that inbound data to my windows store app.

    Thursday, January 9, 2014 5:26 PM
  • This is going to require a dedicated web server.  The reason is that the callback URL will have to point to an always-on, always connected machine with a dedicated IP address so it can receive the callback.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 9, 2014 6:38 PM
    Moderator
  • Am i able to create an application to receive the callback (one that i can run as a server)?
    Friday, January 10, 2014 12:08 AM
  • You could, but it doesn't make sense to do it as a Windows Store app.  The callback needs to be a fixed IP address so as to receive the SMS messages originating from the service to which you're connecting.  A Store app will not have a fixed IP address in most cases.  It would be best if you set up a web service to receive the SMS messages from that service, then forward that message to the Store app with a background process that uses a ControlChannelTrigger to keep an open connection to the Web Server to receive an inbound SMS message.

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.sockets.controlchanneltrigger.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, January 10, 2014 6:23 PM
    Moderator
  • Alright how can i set-up  a  web service for this?
    Friday, January 10, 2014 6:29 PM
  • Create a new ASP.NET application, build the web service in it and publish it to a server.

    Windows Azure Web Sites http://www.windowsazure.com/en-us/solutions/web/ is a good place to publish your web service.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Friday, January 10, 2014 6:32 PM
  • Is there a way to run a web service on an old computer  i am not using?

    Also i already have a website. Is it possible to build the web service and upload to some directory on my website? Would that work?

    Thank You  for your answers.

    Friday, January 10, 2014 6:56 PM
  • >Is there a way to run a web service on an old computer  i am not using?

    Yes, but putting it on the internet is probably a poor solution.

    >Also i already have a website. Is it possible to build the web service and upload to some directory on my website?

    Yes, although you might use a different directory.  And depending on what kind of site it is, you might not be able to deploy an ASP.NET web application there.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Friday, January 10, 2014 7:00 PM
  • I'm going to advise you against rolling your own web site to do this if you're not experienced in this area.  DNS is just one place that you can run into problems without having the full breadth of experience with web servers.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 15, 2014 3:29 PM
    Moderator