This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with User Profiles in Gmail
Overview
The following operations allow you to work with user profiles. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with user profiles, see Sample configuration.
Operation | Description |
---|---|
Gets the user's profile |
Operation details
This section provides further details on the operations related to user profiles.
Getting the user's profile
The getUserProfile
 operation lists all details about the user's profile.
<gmail.getUserProfile/>
Sample request
Following is a sample REST/JSON request that can be handled by the getUserProfile
 operation.
{ }
Related Gmail documentation
https://developers.google.com/gmail/api/v1/reference/users/getProfile
Sample configuration
Following is a sample proxy service that illustrates how to connect to Gmail with the init
 operation and use the getUserProfile
 operation. The sample request for this proxy can be found in listTheProfile sample request.Â
<proxy xmlns="http://ws.apache.org/ns/synapse" name="gmail_getUserProfile" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="userId" expression="json-eval($.userId)"/> <property name="refreshToken" expression="json-eval($.refreshToken)"/> <property name="clientId" expression="json-eval($.clientId)"/> <property name="clientSecret" expression="json-eval($.clientSecret)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="registryPath" expression="json-eval($.registryPath)"/> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <gmail.init> <userId>{$ctx:userId}</userId> <refreshToken>{$ctx:refreshToken}</refreshToken> <clientSecret>{$ctx:clientSecret}</clientSecret> <clientId>{$ctx:clientId}</clientId> <registryPath>{$ctx:registryPath}</registryPath> <accessToken>{$ctx:accessToken}</accessToken> <apiUrl>{$ctx:apiUrl}</apiUrl> </gmail.init> <gmail.getUserProfile/> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <parameter name="serviceType">proxy</parameter> <description/> </proxy>