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.
POST: /login/
VARIABLES:
If you want to send actual member's IP address to be logged in your AuthPro account please include following variables:
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" }
POST: /create/
VARIABLES:
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" }
POST: /update/
VARIABLES:
find_member_id=*
)
You can only send variables you want to update:
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: /list/
VARIABLES:
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:
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" }