- Joined
- Jan 23, 2023
- Messages
- 7
- Reaction score
- 0
Hello,
I'm trying to create a CRM template for my CRM (Initiative CRM).
Concerning authentication, here's how I need to connect:
First API call (getchallenge): https://app.initiative-crm.com/wstiger.php?operation=getchallenge&username=XXXXXXXXXXXX
Which sends me back a token that takes 3 minutes.
Next, I need to send another API call (login):
https://app.initiative-crm.com/wstiger.php with body {Content-Type:application/x-www-form-urlencoded{"operation": "login", "username": "XXXXXXXXX", "accessKey": "XXXXXXX"}}
Knowing that the "AccessKey" is to be calculated according to the token returned in the "getchallenge" operation, concatenated with the "wsuserkey" value (personal access key to the webservice, which is fixed and never changes).
Once these 2 values have been concatenated, the md5 encryption function is applied to feed the "accessKey" parameter.
This request (login) returns a "sessionName", which must be in the parameters of any other API call for me to be authenticated.
So my first problem is: How do I apply this scenario in the XML template? (In postman, everything works, I can make my calls and see the responses in json etc.)
Example of an API request for a contact search via phone number:
https://app.initiative-crm.com/wstiger.php?operation=query&sessionName={{SessionName}}&query=SELECT * from Contacts WHERE phone='01 02 03 04 05';
Then I have another problem: we need to map the api response to the 3CX fields (email, firstname, lastname etc).
The problem is that when I call the api on the contact, the company name is stored in another table. How do I map the data to another table?
I'm attaching the API doc for my crm if that's any help: https://assets-global.website-files...41044a4f41_Documentation-API_REST_IN_v1.1.pdf
I hope I've explained my problem clearly.
Thank you in advance.
Sincerely
Alvecom | ANOUZET Bastien
I'm trying to create a CRM template for my CRM (Initiative CRM).
Concerning authentication, here's how I need to connect:
First API call (getchallenge): https://app.initiative-crm.com/wstiger.php?operation=getchallenge&username=XXXXXXXXXXXX
Which sends me back a token that takes 3 minutes.
Next, I need to send another API call (login):
https://app.initiative-crm.com/wstiger.php with body {Content-Type:application/x-www-form-urlencoded{"operation": "login", "username": "XXXXXXXXX", "accessKey": "XXXXXXX"}}
Knowing that the "AccessKey" is to be calculated according to the token returned in the "getchallenge" operation, concatenated with the "wsuserkey" value (personal access key to the webservice, which is fixed and never changes).
Once these 2 values have been concatenated, the md5 encryption function is applied to feed the "accessKey" parameter.
This request (login) returns a "sessionName", which must be in the parameters of any other API call for me to be authenticated.
So my first problem is: How do I apply this scenario in the XML template? (In postman, everything works, I can make my calls and see the responses in json etc.)
Example of an API request for a contact search via phone number:
https://app.initiative-crm.com/wstiger.php?operation=query&sessionName={{SessionName}}&query=SELECT * from Contacts WHERE phone='01 02 03 04 05';
Then I have another problem: we need to map the api response to the 3CX fields (email, firstname, lastname etc).
The problem is that when I call the api on the contact, the company name is stored in another table. How do I map the data to another table?
I'm attaching the API doc for my crm if that's any help: https://assets-global.website-files...41044a4f41_Documentation-API_REST_IN_v1.1.pdf
I hope I've explained my problem clearly.
Thank you in advance.
Sincerely
Alvecom | ANOUZET Bastien
Last edited: