Veriplace_InvitationAPIInterface for initiating an invitation from Veriplace to an end user, allowing the user to opt into this application.
The application can choose to receive an HTTP callback from Veriplace when the user completes (or declines) this transaction, or can poll for the result.
Note that this feature is currently enabled on a per-application basis and is disabled by default. Contact Veriplace Developer Support to request that it be enabled for your application.
See Veriplace Developer Guide: Using the Invitation API for more details.
Located in /Veriplace/Client.php (line 1486)
Veriplace_API | --Veriplace_AsyncCapableAPI | --Veriplace_InvitationAPI
Veriplace_InvitationStatus
inviteGetLocation
(string $mobileNumber, Veriplace_CallbackOptions $callbackOptions, boolean $sendUserConfirmation)
getCallbackResult (line 1604)
Processes the parameters of an HTTP callback that was posted from Veriplace as the result of an invitation.
The resulting Veriplace_InvitationStatus object will contain either a Veriplace user identifier (in the Veriplace_InvitationStatus::$user property), or an error (Veriplace_AsyncRequestStatus::$exception).
If you used the extended callback mode (see Veriplace_CallbackOptions), it will also contain the mobile number from the original invitation and, if successful, the access token for locating the user. If you used the summary callback mode, it will not contain either of those properties; you will need to keep track of the mobile number yourself (associating it with the invitation's request ID), and you can query the access token with Veriplace_GetLocationAPI::getLocationAccessToken().
To confirm receipt of the callback, this method also sends an immediate HTTP 200 ("OK") response to Veriplace, completing the HTTP response. Do not try to do anything else with the response object after this; if your application returned anything else, or did not respond, Veriplace would repeat the callback.
getInvitationStatus (line 1573)
getResult (line 1631)
Attempt to retrieve the result of an invitation that was previously submitted with inviteGetLocation(). Use this method if you did not specify a callback URI in the original request.
If the invitation is still in progress, this will return the same status object. If the invitation has completed, either successfully or unsuccessfully, it will return an updated status object whose Veriplace_AsyncRequestStatus::$ready property will be true, and which will either contain a Veriplace_User object (Veriplace_InvitationStatus::$user) or an error (Veriplace_AsyncRequestStatus::$exception).
inviteGetLocation (line 1536)
Invite a user to grant Get Location permission to this application.
If allowable - and if the application doesn't already have permission - the user will receive a text message from Veriplace with options to accept or decline the invitation, and to register with Veriplace if the user wasn't already registered.
When the user accepts or declines, Veriplace will send an HTTP POST request to the specified callback URI. Note that this is not a callback in the sense of the browser redirects used in OAuth exchanges, but a direct server-to-server HTTP request. See getCallbackResult() for how to process the callback.
Note that if an application is in development and has not yet been published, it can only invite developer-mode users (i.e. the numbers on its Test Phones list).
To use this method, you must have configured the client with an application-specific access token.
Inherited From Veriplace_AsyncCapableAPI
Veriplace_AsyncCapableAPI::getCallbackResult()
Veriplace_AsyncCapableAPI::getResult()
Inherited from Veriplace_AsyncCapableAPI
Veriplace_AsyncCapableAPI::REQUEST_CREATION_BASE_PATH
Veriplace_AsyncCapableAPI::REQUEST_QUERY_BASE_PATH
Documentation generated on Sun, 29 Aug 2010 04:08:36 -0700 by phpDocumentor 1.4.1