which endpoint do I post to?

%3CLINGO-SUB%20id%3D%22lingo-sub-280463%22%20slang%3D%22en-US%22%3ERe%3A%20which%20endpoint%20do%20I%20post%20to%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-280463%22%20slang%3D%22en-US%22%3E%3CP%3Enobody%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-650732%22%20slang%3D%22en-US%22%3ERe%3A%20which%20endpoint%20do%20I%20post%20to%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-650732%22%20slang%3D%22en-US%22%3E%3CP%3ESame%20question...%20hours%20searching.%20I%20feel%20like%20i'm%20missing%20something%20very%20obvious%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20best%20I%20could%20come%20up%20with%20so%20far%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Frest-api%2Fbot-framework-rest-connector-api-reference%3Fview%3Dazure-bot-service-4.0%23base-uri%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBot%20Service%20-%20Base%20URI%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20says%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E%3CSPAN%3EThe%26nbsp%3B%3C%2FSPAN%3EserviceUrl%3CSPAN%3E%26nbsp%3Bproperty%20within%20the%20user's%20message%20indicates%20that%20the%20bot%20should%20send%20its%20response%20to%20the%20endpoint%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fsmba.trafficmanager.net%2Fapis%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsmba.trafficmanager.net%2Fapis%3C%2FA%3E%3CSPAN%3E%3B%20this%20will%20be%20the%20base%20URI%20for%20any%20subsequent%20requests%20that%20the%20bot%20issues%20in%20the%20context%20of%20this%20conversation.%20If%20your%20bot%20will%20need%20to%20send%20a%20proactive%20message%20to%20the%20user%2C%20be%20sure%20to%20save%20the%20value%20of%26nbsp%3B%3C%2FSPAN%3EserviceUrl%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EDoes%20this%20mean%20my%20bot%20has%20to%20receive%20a%20message%20before%20I%20ever%20am%20able%20to%20send%20proactive%20messages%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20this%20is%20the%20case%2C%20how%20do%20people%20ever%20get%20%22one-way%20notifications%22%20bots%20to%20function%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-270420%22%20slang%3D%22en-US%22%3Ewhich%20endpoint%20do%20I%20post%20to%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-270420%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20building%20a%20simple%20bot%20in%20PHP%20using%20REST%20api..%3C%2FP%3E%3CP%3EThe%20purpose%20of%20the%20bot%20is%20to%20send%20a%20weekly%20message%20to%20my%20group%20members.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20routine%20is%3A%3C%2FP%3E%3CP%3Ea)%20fetch%20token%3C%2FP%3E%3CP%3Eb)%20fetch%20users%20in%20group%3C%2FP%3E%3CP%3Eb)%20send%20message%20to%20each%20user.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3Efetching%20the%20token%20for%20the%20OAUTH2-procedure%20works.%3CBR%20%2F%3EFor%20this%20I%20use%20the%20endpoint%20%22%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%7Btenant_id%7D%2Foauth2%2Fv2.0%2Ftoken%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%7Btenant_id%7D%2Foauth2%2Fv2.0%2Ftoken%3C%2FA%3E%22%20fetching%20all%20the%20users%20in%20the%20group%20also%20works.%3CBR%20%2F%3EFor%20this%20I%20use%20the%20token%20from%20step%20a)%20and%20the%20endpoint%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7BO365group%7D%2Fmembers%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7BO365group%7D%2Fmembers%3C%2FA%3E%20sending%20a%26nbsp%3BProactive%20message%20to%20a%20user%20is%20my%20problem.%26nbsp%3B%3CBR%20%2F%3EAccording%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbots%2Fbot-conversations%2Fbots-conv-proactive%23starting-personal-conversations%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ethis%20page%3C%2FA%3E%20I%20can%20send%20a%20procactive%20message%20to%20a%20user%20using%20%22POST%20%2Fv3%2Fconversations%22%3CBR%20%2F%3Ebut%20what%20is%20the%20full%20URL%3F%20I've%20tried%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv%3C%2FA%3E3%2Fconversations%20and%20I've%20tried%20%22%3CA%20href%3D%22https%3A%2F%2Fsmba.trafficmanager.net%2Femea%2Fv3%2Fconversations%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fsmba.trafficmanager.net%2Femea%2Fv3%2Fconversations%3C%2FA%3E%22%20(this%20is%20the%20serviceURL%20for%20my%20tenant%22.%20In%20both%20cases%20I%20use%20the%20token%20I%20fetched%20in%20step%20a).%20But%20in%20both%20cases%20I%20get%20an%20%22autorization%20failed%22-401%20error.%26nbsp%3B%3CP%3ESo%20my%20question%20is%3A%20to%20which%20endpoint%20do%20i%20POST%20my%20json-formatted%20message%20so%20it%20ends%20up%20at%20the%20specified%20user%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-270420%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%20REST%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EApp%20Services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

I'm building a simple bot in PHP using REST api..

The purpose of the bot is to send a weekly message to my group members. 

 

The routine is:

a) fetch token

b) fetch users in group

b) send message to each user.

 

So my question is: to which endpoint do i POST my json-formatted message so it ends up at the specified user?

2 Replies
Highlighted

nobody?

Highlighted

Same question... hours searching. I feel like i'm missing something very obvious?

 

This is the best I could come up with so far: Bot Service - Base URI

 

It says:

 

The serviceUrl property within the user's message indicates that the bot should send its response to the endpoint https://smba.trafficmanager.net/apis; this will be the base URI for any subsequent requests that the bot issues in the context of this conversation. If your bot will need to send a proactive message to the user, be sure to save the value of serviceUrl

Does this mean my bot has to receive a message before I ever am able to send proactive messages?

 

If this is the case, how do people ever get "one-way notifications" bots to function?