Mar 03 2017 08:59 PM
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/messagingI... 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
Mar 29 2017 12:52 PM
The portal has been updated.
Note that AppID url should be a domain in your tenant. Callback URL can be anything.
Thanks,
Vinay
Mar 29 2017 02:02 PM
I have done that, my domain is a verified custom domain on Azure AD
Mar 31 2017 11:39 AM
Hi Richard
Thank you for the update. This should be fixed now. The App ID Uri will not have a 443 anymore.
Reach out to us if you need help further. Thanks for the feedback. We are working on improving debuggability and testability for callbacks in general. Will have more updates soon.
Thanks,
Renukha
Mar 31 2017 11:43 AM
Hi Patrick,
If you did not create this application recently, could you check if the callback url has a 443 and remove it and validate if the callback works fine as Richard had suggested.
Thanks,
Renukha
Apr 19 2017 11:10 PM
Hi,
I found root cause. Currently, Some Trusted Application API can run in US region of Office 365. My Office 365 tenant in Japan region. In non US region, I got error when call REST API.
Could you roll out this API to any regions? I want to this API on any regions.
May 04 2017 06:18 AM
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...
Jun 02 2017 09:43 AM - edited Jun 02 2017 09:43 AM
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