AuthPro API Reference

AuthPro API v2 is a JSON based and can be used to develop custom integrations to manage your Authpro members data.

All API calls are relative to this URL: https://www.authpro.com/api2

If you don't have an AuthPro account already, you'll need to create one in order to use this API.

You can find list of possible API calls below. Please contact us if you have feedback or questions.


Verify member's login and password

POST: /login/

VARIABLES:

  • user = Your authpro account username
  • login = member's login name
  • password = member's password

If you want to send actual member's IP address to be logged in your AuthPro account please include following variables:

  • IP = member's IP address
  • api_key = your account api key

EXAMPLE:

curl -X POST https://www.authpro.com/api2/login/ \
     -d 'user=YOUR_USERNAME' \
     -d 'api_key=YOUR_API_KEY' \
     -d 'login=SOMELOGIN' \
     -d 'password=SOMEPASSWORD' 
{
   "result": "OK",
   "message": "",
   "session": "2i6orcvg9n4d2j0k",
   "ok_url": "http://www.example.com/success"
}
  
{
   "result": "FAIL",
   "message": "You have entered incorrect login or password. Please try again",
   "fail_url": "http://www.example.com/failure"
}
  

Add new member

POST: /create/

VARIABLES:

  • user = Your authpro account username
  • api_key = account api code

  • _login = new member login name (required)
  • _email = new member email address (required)
  • _password = new member password (optional, will be generated if empty)
  • set_urlok = custom successful login URL (optional)
  • set_urlwrong = custom failed login URL (optional)
  • set_is_exp_logins = set logins expirtion (optional, 0 = no expiration, 1 = suspend, 2 = delete after set_exphits logins)
  • set_exp_logins = number of logins allowed
  • set_is_exp_time = set time expirtion (optional, 0 = no expiration, 1 = suspend, 2 = delete after specified period)
  • set_exp_time = number of expiration periods
  • set_exp_time_type = expiration period (m = minutes, h = hours, D = days, M = months, Y = years)
  • force_password_change = any value (send this variable to force member to change their password at first login)
  • IP = member's IP address

any other variables sent in this API request will be saved in member's profile

EXAMPLE:

curl -X POST https://www.authpro.com/api2/create/ \
     -d 'user=YOUR_USERNAME' \
     -d 'api_key=YOUR_API_KEY' \
     -d '_login=SOME_LOGIN' \
     -d '_email=SOME_EMAIL' \
     -d '_password=SOME_PASSWORD' \
     -d 'set_isexptime=1&set_exptime=7&set_exptimet=D'
{
   "result": "OK",
   "message": "",
   "id": "12345",
   "login": "SOME_LOGIN",
   "password": "SOME_PASSWORD"
   "verify_url": "https://authpro.com/verify.htm?YOUR_USERNAME;SOME_LOGIN;12345"
}
  
{
   "result": "ERROR",
   "message": "Sorry, login SOME_LOGIN already taken, please choose another one"
}
  

Update members details

POST: /update/

VARIABLES:

  • user = Your authpro account username
  • api_key = account api code

  • find_member_login = member's login name (locate member by login)
  • or
  • find_member_email = member's email address (locate member by email)
  • or
  • find_member_ptrans = member's paid subscription id (only for paid registrations)
(If you want to apply update to all members you can use: find_member_id=*)

You can only send variables you want to update:

  • login
  • password
  • email
  • urlok
  • urlfail
  • status = A or S or D (active or suspend or delete)
  • is_exp_time = N or S or D (none or suspend or delete)
  • exp_time = number (used with exp_time_type)
  • exp_time_type = m or h or D or M or Y (for minites, hours, days, months or years)
  • is_exp_logins = N or S or D (none or suspend or delete)
  • exp_logins = number of logins
  • pfdelete = field1,field2,field3 etc (if you want to delete some profile fields)

any other variables sent in this API request will be saved in member's profile

EXAMPLE (update email and password, set active status expired in 7 days):

curl -X POST https://www.authpro.com/api2/update/ \
     -d 'user=YOUR_USERNAME' \
     -d 'api_key=YOUR_API_KEY' \
     -d 'find_member_login=SOME_LOGIN' \
     -d 'email=SOME_EMAIL' \
     -d 'password=SOME_PASSWORD' \
     -d 'status=A&is_exp_time=S&exp_time=7&exp_time_type=D'
{
   "result": "OK",
   "message": ""
}
  
{
   "result": "ERROR",
   "message": "member not found"
}
  

Get members list

GET: /list/

VARIABLES:

  • user = Your authpro account username
  • api_key = account api code
  • record = list of member's record fields you want to load (example: "{login}{email}{name}")

Member record fileds list:
{id} unique member's id
{login} member's username
{email} member's email address
{status} member's status (Active or Suspended)
{reg_date} registration date
{reg_time} registration date/time
{reg_type} registration type (Free, API, Paid or Manual)
{exp_date} member's account expiration date
{exp_time} member's account expiration date and time
{last_login_date} date of last successful login
{last_login_time} date and time of last successful login
{bill_pc} {bill_id} paid member's billing method and id
{bill_item} {bill_cust} {bill_subscr} {bill_qty} additional paid member's information (if available)
{anyfield} field from member's profile

You can filter records (search) members with specific attributes:

  • login = full or part of member's login
  • login_full = full member's login
  • email = full or part of member's email address
  • email_full = full member's email address
  • status = A (active) or S (suspended) or D (deleted) members status
  • reg_type = F (free) or P (paid) members registration
  • profile = search for specific text in entire member's profile
  • profile:field = search for specific text in specified profile field
  • register_after = YYYY-MM-DD (only list member's registered after specified data)
  • register_before = YYYY-MM-DD (only list member's registered before specified data)
  • limit = NNN - number of records to load (i.e: 100)
  • limit = NNNs - load members created in last NNN seconds (i.e: 1000s)
  • limitd = NNNs - load members deleted in last NNN seconds (i.e: 1000s)

EXAMPLE (list members created in last 24 hours):

curl -X POST https://www.authpro.com/api2/list/ \
     -d 'user=YOUR_USERNAME' \
     -d 'api_key=YOUR_API_KEY' \
     -d 'record={id}{login}{email}{name}{reg_time}' \
     -d 'limit=86400s'
{
   "members_total": 3,
   "members": [
      {
         "id":"1001",
         "login":"test1",
         "name":"James",
         "email":"james@example.com",
         "reg_time": "2021-03-18 10:20:10"
      },
      {
         "id":"1002",
         "login":"test2",
         "name":"Max",
         "email":"max@example.com",
         "reg_time": "2021-03-18 17:25:20"
      },
      {
         "id":"1003",
         "login":"test3",
         "name":"Henry",
         "email":"henry@example.com",
         "reg_time": "2021-03-18 19:35:30"
      }
   ]
}
  
{
   "result": "ERROR",
   "message": "wrong api key"
}