Proxidize Knowledge Base

API Usage Documentation

All of the API routes require headers with the token key.
The token key should be included in the Authorization HTTP header.
The key should be prefixed by the string literal "Token", with whitespace separating the two strings.

For example:

Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

Dongles' operations API

Retrieve modems information

GET /api/getinfo
Example
: http://localhost/api/getinfo
Response: JSON Object with all modems information.


Rebooting a specific modem

GET /api/reboot_modem?index=MODEM_INDEX

*Reboots modem with index=1*

Example: http://localhost/api/reboot_modem?index=1

Response: Status message

Rotate API:

Rotate all modems

GET /api/rotate
Example
: http://localhost/api/rotate
Response: Status message


Rotate specific modem:

(Authorization token should be included in the header)

GET /api/change_ip?index=MODEM_INDEX
*Rotates modem with index = 1*
Example
: http://localhost/api/change_ip?index=1
Response: Status message

Rotate specific modem with rotation token:

(This option should be enabled from the Proxidize web interface by setting a custom token)

GET /api/change_ip?index=MODEM_INDEX&rtoken= ROTATION_API_TOKEN
*Rotates modem with index = 1 authenticated by the custom set rotation token*
Example
: http://localhost/api/change_ip?index=1&rtoken=johndoe123
Response: Status message

SMS API

View modem SMS messages for a specific modem

GET /api/sms/get?index=MODEM_INDEX

*Returns all the received SMS messages for modem with index 1*

Example: http://localhost/api/sms/get?index=1

Response: JSON Object containing SMS messages with their details (date, sender's phone, message and content)

Send SMS from a modem to any phone number

GET /api/sms/send?index=MODEM_INDEX&phone=PHONE&message=MESSAGE

Example: http://localhost/api/sms/send?index=1&phone=+123456789&message=Hello_World

Response: Status message

Delete a single SMS message:

GET api/delete_sms?sms_id=SMS_ID&modem_index=Modem_index

Example: api/delete_sms?sms_id=22&modem_index=5

Response: Delete SMS requested for message id XXX on modem index XXX

ERROR: There was an error deleting SMS message(s).

Delete multiple SMS messages: (separate SMS IDs with a comma)

Note: You can get the SMS IDs from the "Message ID" colomn in your SMS page

GET api/delete_sms?sms_id=SMS_ID1,SMS_ID2,SMS_ID3&modem_index=Modem_index

Example: api/delete_sms?sms_id=22,23,25,99&modem_index=5

Response: Sucessfully deleted all SMS messages.

ERROR: There was an error deleting sms message(s).


Set Custom rotation interval API:

GET /api/custom_rot?index=DONGLE_INDEX&day=VALUE&hour=VALUE&min=VALUE

  • index (required): can be set to specific dongle's index or the keyword "all" to set the same rotation value for all plugged dongles.
  • Interval paramters: Only use one of them at a time.
    • day: rotation value in days minimum is 0 maximum is 29
    • hour: rotation value in hours minimum is 0 maximum is 22
    • min: rotation value in minutes minimum is 0 maximum is 58

Example:
Set the rotation value for dongle with index 5 to rotate every 2 days

http://localhost/api/custom_rot?index=5&day=2


Example 2:
Set the rotation value for all dongles to rotate every 8 hours:

http://localhost/api/custom_rot?index=all&hour=8
Response: Status message

Shared proxies API:

Retrieve all shared proxies information:

GET /api/shared_proxy/

Example: http://localhost/api/shared_proxy

Response: JSON Object containing shared proxy


Add shared proxy:

GET /api/shared_proxy/add?

Parameters:

  • index: which is the modem index that you want to use.
  • proxy_type: either "http" or "socks".
  • auth_type: either "UserAuth" or "IPAuth".
    • If UserAuth was selected then you will have to fill the following parameters:
      • user: authentication username.
      • password: authentication password.
    • If IPAuth was selected:
      • ip: allowed IP/s. Multiple ips can be inserted separated with comma (,).
  • Optional parameters:
    • comment: comments for the proxy.
    • port: Port to use or leave empty for random port.
    • bandwidth: bandwidth(speed) limit in mpbs.
    • whitelist: Allow proxy to visit these websites only (separate multiple values by a comma (,))
    • blacklist: Deny proxy from visiting these websites (separate multiple values by a comma (,))
    • traffic_limit_amount: Limit the proxy usage value in MB.
    • traffic_limit_duration: Duration of the limit Values should be one of (day, week ,month) traffic_limit_amount and traffic_limit_duration should be filled both if you want to use the limit feature
    • expire_date: expire date for the proxy MUST BE USING THIS FORMAT (%Y-%m-%d)

Example:

  • Creating shared proxy with UserAuth authentication, http proxy type using modem with index = 3:

http://localhost/api/shared_proxy/add index=3&auth_type=UserAuth&proxy_type=http&user=Proxidize&password=123Pass

  • Creating shared proxy with IP authentication, socks proxy type using modem with index = 1

http://localhost/api/shared_proxy/add?index=1&auth_type=IPAuth&proxy_type=socks&ip=192.168.1.100

  • Creating shared proxy with multiple IP authentication, http proxy type using modem with index = 1 and a comment:

http://localhost/api/shared_proxy/add?index=1&auth_type=IPAuth&proxy_type=http&ip=192.168.1.100,192.168.5.20&comment=Hello_World

Response: JSON Object containing shared proxy


Delete all shared proxies and clear config file

GET /api/shared_proxy/delete

Example: http://localhost/api/shared_proxy/delete

Response: Status message


Delete specific shared proxy from database and config file

GET /api/shared_proxy/delete?port=PORT

Example: http://localhost/api/shared_proxy/delete?port=35501

Response: Status message


Rotate shared proxy's dongle.

GET /api/sproxy/rotate

Parameters:

  • proxy_port: is the shared proxy's port.
  • proxy_pass: is the password of the proxy.

Example: http://localhost/api/sproxy/rotate?proxy_port=21035&proxy_pass=very_secure_password142

Response: Status message

Errors Messages:

There was an error handling your request.

Reasons:

  1. Your request is not in the correct syntax.
  2. Modem is unreachable or offline.

Content

© Copyright 2023 Proxidize Ltd - London - All Rights Reserved

All Proxidize hardware is assembled and shipped with ❤️ from the UK 🇬🇧

Subscription Form (#11)

All Proxidize hardware is assembled and shipped with ❤️ from the UK 

UK Flag
Start Now
chevron-down linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram