Forum Discussion

Andy Waschick's avatar
Andy Waschick
Copper Contributor
Mar 04, 2017

Calling resources on Trusted Application API for Skype Business Online shows CallbackUriUnreachable

I am tasked with implementing a bot connector for Skype for Business Online, and to say it has been challenging is an understatement.  I realize that the Trusted Application API is very new, and just for fun, I also work in a PHP shop, so I'm really not doing myself any favors.  However the beauty of a REST api is supposedly that the language I choose to implement in doesn't matter.

 

In any case, I have jumped through the many hoops of Azure AD authentication and have gotten a reliable process built for getting a token and retrieving the top-level resource urls.  But, when I call these resources (which should be the last step before seeing "hello" in my skype client) I am stymied by an error. 

 

I am calling my "startMessaging" resource, as defined by the communication group on the main Application resource request.  Example call going to https://api.skypeforbusiness.com/platformservice/v1/applications/3168576520/communication/messagingInvitations?endpointId=sip:joanbot@equityim.onmicrosoft.com sends this data in the body:

 

{
"to":"sip:awaschick@equityim.onmicrosoft.com",
"operationId":"1",
"callbackUrl": "https://janedev8001.ngrok.io/event"
}

In response, I get:

{
  "code": "BadRequest",
  "subcode": "CallbackUriUnreachable",
  "message": "Exception of type 'PlatformService.Web.ValidationException' was thrown.",
  "debugInfo": {
    "errorReportId": "7ade7fb108cd4d28b5ecfebafe6e86bc"
  }
}

The thing is, on my dev proxy, it never registers an incoming request at my specified callback URL.  It's there, I can hit it myself, so everybody else should be as well.  

 

When I configured my Skype endpoint as instructed by the trusted api documentation, in Powershell, though, I get back this information:

 

RunspaceId     : e62a1040-160f-4d5f-a186-d114b76992e2 
FriendlyName   : jane-dev 
Id             : 458ff1f0-53b3-495b-b0ce-47d1cbad5849 
TenantId       : e39d3de2-8d8c-4285-a31d-b4144c3d82d8 
EndpointType   : Targeted 
SipUri         : sip:joanbot@equityim.onmicrosoft.com 
PhoneNumber    : 
CallbackUri    : 
Ring           : 
ClientAudience : 

 

No default callback Uri.  I'm wondering, is this the callback endpoint that it can't reach when I try to start messaging?  I'm at a loss here as to how to define this, if so.  I can't find documentation on a specific cmdlet I can run that will let me set this value, if so.  

 

I'm quite at the end of my rope here.  What am I missing?

 

Andy

 

26 Replies

  • Hi,

    Has anyone resolved this issue?

    Sometimes i am getting "CallbackUnreachable" and sometimes it is working for the same request, even though the callback is reachable...

    • Fabien Vauchelles's avatar
      Fabien Vauchelles
      Copper Contributor

      Hello,

      We are blocked on this point too.

      We have a verified domain. Our App Url Id and Callback Url Id are the same and registered with the portal. Endpoint is found in the SFB user list.

      However, when we speak with the bot. No callback is triggered.

      What did we miss?
      Thanks,

      Fabien

  • null null's avatar
    null null
    Copper Contributor

    I too am facing this issue when trying to get the TrustedJoinMeeting sample working.  I am listening on the callback uri and have verified that it is reachable.  However, I do not see a request come in before receiving the 'CallbackUriUnreachable' error.

     

    https://github.com/OfficeDev/skype-docs/tree/master/Skype/Trusted-Application-API/samples/QuickStartSamples/TrustedJoinMeeting

     

    See attached file for a trace of this.

     

    -Tom

    • Renukha Rajaraman's avatar
      Renukha Rajaraman
      Copper Contributor

      Hi Tom,

      Thanks for the traces. We will look into this and get back to you.

      Also, could you please share your HTTP Request and Response headers when you get a chance. We would like to see what comes in the response header. Also, we are looking to improve debuggability or work on a solution to help with debugging call back failures.

       

       

    • Andy Waschick's avatar
      Andy Waschick
      Copper Contributor

      No, I was forced to fall back and build something using the oauth authentication flow, where my service puppets an Office 365 user account to interact with humans.  It's super hacky, but will get me by until such time that the trusted App Api is actually ready for use.  

       

      Since I have spent my time going in this direction, I haven't had a chance to review the current state of the Trusted Application API, and was hoping it wouldn't be long until the issue I was having was resolved.  You encountering the same problem weeks later confirms my temporary solution was unfortunately the right course of action.

       

       

      • Renukha Rajaraman's avatar
        Renukha Rajaraman
        Copper Contributor

        Are you still seeing issues with callback? The callback is configured at the application level and you should be able to set that up from the Skype for Business online application registration portal

        https://skypeappregistration.azurewebsites.net/appregistration

        If you don’t see the callback Uri in the tenant admin shell that is expected. 

        Could you share your traces if you are still seeing issues with callback we could see what is happening there and help with debugging further.  

Resources