TURL_GetAuthorizationURL (function reference)

By June 1, 2017 September 26th, 2017 Online Help, Troi URL plug-in
Troi URL Plug-in > Functions reference > TURL_GetAuthorizationURL
Troi URL Plug-in for FileMaker Pro

TURL_GetAuthorizationURL

Talks with a web service to get an authorization URL. With the returned URL the user can authorize the plug-in (in a web browser) to use this service.

SyntaxFunction badge

TURL_GetAuthorizationURL ( switches ; method ; requestTokenURL ;
authorizationURLbegin )

Parameters

switchesdetermine the behaviour of the function
methodeither POST or GET
requestTokenURLURL to obtain a request token from the web service
authorizationURLbeginfirst part of the authorization URL, which will be used to construct the complete URL

Switches

switches must be set to:

-OAuthProtocolthe plug-in is using the OAuth protocol

Returned Result

Data type returned

text

Result

If successful this function returns the complete authorization URL. With this URL the user can authorize the plug-in to use this service.

If unsuccessful it returns an error code starting with $$ followed by the error code.

Originated in

Troi URL Plug-in 2.6

Compatibility

FileMaker Pro 12 to 16

Considerations

This function provides the first step to authorize the plug-in.
The plug-in currently only supports the OAuth 1.0A Authorization protocol.

Example

Set Variable [ $Twitter_Request_token_step_URL ; "https://api.twitter.com/oauth/request_token" ]
Set Variable [ $Twitter_Authorization_URL_Begin ; "https://api.twitter.com/oauth/authorize" ]
#
# Get the URL to the authorization web page where the user can grant access:
Set Variable [ $Twitter_Authorization_URL ;
		TURL_GetAuthorizationURL ( "-OAuthProtocol:" ; "POST" ; 
		$Twitter_Request_token_step_URL ; 
		$Twitter_Authorization_URL_Begin ) ]
Open URL [ $Twitter_Authorization_URL ]

Related functionsFunction badge

TURL_SendAuthorizationPIN
TURL_SendAuthorizedRequest

Online Help Page for Troi URL Plug-in for 12 to 16 –> TURL_GetAuthorizationURL (urlp4414) 2017-0623 12:04:43