View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Python connection to API - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

Python connection to API

More
28 Mai 2020 14:57 #1 by xav38
Hi ,

Thanks for creating ProjeQtOr, it is very relevant .

Our company would like to go further in order to automate or inject some data into ProjeQtOr. So we are trying to develop something in python by using the provided API.

We succeed to use GET api, for POST API it is more complicated. I would like to highlight we succeed to use the POST api with PHP, that means data send to the API are correctly formatted , the user key provided is the good one as well as the credentials .

The problem we encounter is related to encryption. I dig into the php code and I am wondering which encrypted data I have to produce.

In the documentation you provided for PHP , you are using "AesCtr::encrypt" for encrypting the module. Is it the behavior of this function I have to reproduce in python ? do you have more information ?

Thanks for your help.

The following PHP code work perfectly fine

$data=AesCtr::encrypt($data, $Key, 128);
$curl = curl_init($fullUrl);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $Auth);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, array('data'=>$data));
$curl_response = curl_exec($curl);
echo $curl_response;
curl_close($curl);
?>
The topic has been locked.
More
01 Jui 2020 11:46 #2 by babynus
Replied by babynus on topic Python connection to API

In the documentation you provided for PHP , you are using "AesCtr::encrypt" for encrypting the module. Is it the behavior of this function I have to reproduce in python ? do you have more information ?

It is common AES encryption.
Similar library exist in python.
www.novixys.com/blog/using-aes-encryptio...ion-python-pycrypto/
pycryptodome.readthedocs.io/en/latest/src/cipher/aes.html

NB : by default we use AES128 as AES256 is illegal in some countries.

Babynus
Administrator of ProjeQtOr web site
The topic has been locked.
Moderators: babynusprotion
Time to create page: 0.034 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.