[TYPO3-dev] Extension callback URL generation

Conor Hackett hakko1872003 at yahoo.co.uk
Wed May 18 13:17:05 CEST 2011


Hi Guys,

I'm working on an extension for a web service that uses OAuth2. I need 
to be able to provide a callback url to the service.

I've read on here that I can use an explicit url to a PHP script in my 
extensions directory.

e.g. http://127.0.0.1/typo3/typo3conf/ext/my_plugin/pi1/callback.php

My question is, will this url remain the same for all installs (with 
exception of domain)? I'm just wondering how to present the URL to the 
user when they are setting up the extension. For example will the path 
to my extension files remain the same or can Typo3 be reconfigured to 
store extensions somewhere?

I'm thinking the best way would be construct the url using in php and 
output to the user on the setup page. The following code:

t3lib_div::getThisUrl().'typo3conf/ext/ch_guestbook/pi1/callback.php

Outputs:

http://127.0.0.1/typo3/typo3conf/ext/my_plugin/pi1/callback.php

This script will then take the code provided in the callback ($_GET) and 
save it as a setting (salted & encrypted).

Thanks,
Conor




More information about the TYPO3-dev mailing list