Jump to content

API Access Key safe for iPhone application?


crspyjohn

Recommended Posts

Hi, Is using API Access Key safe for a public iPhone application for signup, checking billing information etc? I'm worried if the APP is jailbroken, then the access key/admin/password would be public.

 

Looked at the sample JSON code here, http://docs.whmcs.com/API:JSON_Sample_Code . Does the WHMCS API support SSL?

 

John

Edited by crspyjohn
Link to comment
Share on other sites

One thing I always do is change

 $url = "http://www.yourdomain.com/includes/api.php"; # URL to WHMCS API file goes here
$username = "Admin"; # Admin username goes here
$password = "demoxyz"; # Admin password goes here
$postfields = array();
$postfields["username"] = $username;
$postfields["password"] = md5($password);

to

 $url = "http://www.yourdomain.com/includes/api.php"; # URL to WHMCS API file goes here
$username = "Admin"; # Admin username goes here
$password = "d097c0b5730d44f798dc67b4d71e91e9"; // this is an md5 of the admin's password
$postfields = array();
$postfields["username"] = $username;
$postfields["password"] = $password;

 

That way the password is an MD5 and not plain text, you can get an MD5 by going to http://www.md5.cz/ or running this in php

 

<?php
$plaintext = "PUT PASSWORD HERE";
$getmd5 = md5($plaintext);
echo $getmd5;
?>

Link to comment
Share on other sites

One thing I always do is change

 $url = "http://www.yourdomain.com/includes/api.php"; # URL to WHMCS API file goes here
$username = "Admin"; # Admin username goes here
$password = "demoxyz"; # Admin password goes here
$postfields = array();
$postfields["username"] = $username;
$postfields["password"] = md5($password);

to

 $url = "http://www.yourdomain.com/includes/api.php"; # URL to WHMCS API file goes here
$username = "Admin"; # Admin username goes here
$password = "d097c0b5730d44f798dc67b4d71e91e9"; // this is an md5 of the admin's password
$postfields = array();
$postfields["username"] = $username;
$postfields["password"] = $password;

 

That way the password is an MD5 and not plain text, you can get an MD5 by going to http://www.md5.cz/ or running this in php

 

<?php
$plaintext = "PUT PASSWORD HERE";
$getmd5 = md5($plaintext);
echo $getmd5;
?>

 

Can you limit the Admin API access? Like the API user can only add accounts?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated