Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The sendInvitation operation sends an e-mail invitation.

Code Block
languagexml
titlesendInvitation
<yammer.sendInvitation>
	<email>{$ctx:email}</email>
</yammer.sendInvitation>
Properties
  • email: The e-mail address of the invitee.
Anchor
request
request
Sample request

Following is a sample REST/JSON request that can be handled by the sendInvitation operation.

Code Block
languagexml
titleSample Request for sendInvitation
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"bxmUDADfr3F2ee1rE2Awkw",
	"email":"janaka@Chamath.onmicrosoft.com"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-invitations

Anchor
sampleconfiguration
sampleconfiguration
Sample configuration

Following is a sample proxy service that illustrates how to connect to Yammer with the init operation and use the sendInvitation operation. The sample request for this proxy can be found in the sendInvitation sample request.

Code Block
languagexml
titleSample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="yammer_sendInvitation"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiToken" expression="json-eval($.apiToken)"/>
         <property name="email" expression="json-eval($.email)"/>
         <yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
         </yammer.init>
         <yammer.sendInvitation>
            <email>{$ctx:email}</email>
        </yammer.sendInvitation>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>