RealTimeDesigner Support Network
Wiki Forums Libraries Docs Support RealTimeDesigner Home
Welcome! Log In Create A New Profile

Advanced

IMPORTANT - Upcoming API access update

Posted by Alex 
IMPORTANT - Upcoming API access update
July 13, 2012 12:47PM
We're currently revising the RTD API to be a far more powerful tool.
While proceeding, we realized the current access method to it is not the best possible: infact you can access API only using your main login/password pair.
This is not good in case an external developer is needed to code against the API for you, because in that case you would surely not like to provide him full access to your entire admin panel.

For this reason, I am going to add a new area in RTD admin panel in which you can define a separate login/password specific for API. This will also allow us to better track how much API are used, to calibrate the needed server power.

SO, IN CASE YOU'RE ALREADY USING THE API SOMEWHERE:

I should release the tool to create the new API credentials during next week.
To avoid downtimes, for a short period you'll be allowed to use both the current credentials and the new ones.

But, on Sunday July 29th 2012, between 9-10 pm EST Time, only the new system will be allowed to access.
So, before that date you'll have to create the new credentials and edit your API-based scripts accordingly, otherwise your script will stop working returning a "Wrong login or passoword" error.


I will write again in this thread when the new system will be released, with instructions on how to perform the update.
Re: IMPORTANT - Upcoming API access update
July 17, 2012 06:42AM
It's done.

In your admin panel, you can now see a new Manage API Credentials link on the left area, immediately below the Change Your Password one.
You can use that to create or change your API credentials.
I've also update informations and sample files in the support network

As promised, the API will currently accept both the old and the new system. But as mentioned in the previous post, on Sunday July 29th 2012, between 9-10 pm EST Time, only the new system will be allowed to access.

So, if you're using the API already, better to update your scripts soon!
What you need to do in this case:

IF YOU ARE USING AS REFERENCE THE OFFICIAL SAMPLE FILES
- Download the new version here: http://support.realtimedesigner.com/docs/RTD_api_sample_scripts.zip
- Extract only the RTD_functions.php file, which is the only one you'll need to change
- Edit the RTD_functions.php file, and change the $RTD_API_USERNAME, $RTD_API_PASSWORD and $RTD_API_SIGNATURE values to match your new RTD API credentials.

IF YOU CREATED YOUR OWN SCRIPTS
Previously you passed only login and password to the API with something like this:
designer.realtimedesigner.com/api.php?rtd_login=API_USERNAME&rtd_password=API_PASSWORD
Now, you only have to change the password and add also the signature, with something like this:
designer.realtimedesigner.com/api.php?rtd_login=$API_USERNAME&rtd_password=$API_PASSWORD&rtd_signature=$API_SIGNATURE

Hope all is clear. If not, let me know.
Enjoy!
Re: IMPORTANT - Upcoming API access update
July 17, 2012 06:58AM
Just a small extra, to be extremely clear on how to update existing scripts.
This is specifically for some users I've created API scripts for.

In general, you need to:

1)
Go in the new Manage API Credentials page and create your new API credentials

2)
In your scripts, where you have this block:
$RTD_API_USERNAME = 'your_rtd_username';
$RTD_API_PASSWORD = 'your_rtd_password';
replace with this:
$RTD_API_USERNAME = 'your_rtd_username';
$RTD_API_PASSWORD = 'new_api_password';
$RTD_API_SIGNATURE = 'new_api_signature';

3)
In your scripts, look for this string:
function RTD_Post($params)
Into that function, you'll need to perform 2 changes:

Change
global $RTD_API_USERNAME,$RTD_API_PASSWORD;
to
global $RTD_API_USERNAME,$RTD_API_PASSWORD,$RTD_API_SIGNATURE;

Change
$API_params = "rtd_login=$RTD_API_USERNAME&rtd_password=$RTD_API_PASSWORD";
to
$API_params = "rtd_login=$RTD_API_USERNAME&rtd_password=$RTD_API_PASSWORD&rtd_signature=$RTD_API_SIGNATURE";


That's it. Be sure to test, and let me know in case of issues!
cos
Re: IMPORTANT - Upcoming API access update
July 17, 2012 09:01AM
Nice. Thanks.
Re: IMPORTANT - Upcoming API access update
July 31, 2012 06:00PM
Just for your information: as planned, the old login method was disabled.
Now only new credentials will allow to use the API
Sorry, only registered users may post in this forum.

Click here to login