API Configuration (Put Input Variable) on Phantombuster

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Hello everyone, I've been looking to connect to an API on the Phantombuster.com platform https://phantombuster.com/console/27521
I managed to get it started and stopped with the help of @bigcajones. I would like to integrate the input variables into the configuration of an API. I have integrated it this way as you can see in the screen print with a POST thanks to bigcajones... Do you see a problem in the POST Request with my template in link? @VladZen @rostonix @sergodjan66 @Mikhail B. @Hungry Bulldozer @ZennoScript

It may come from the "More" tab with "User Agent" or
Cookie. Thank you for your help! :-)

POST REQUEST:
Data:
Код:
argument=data "{\"output\":\"first-result-object\",\"argument\":{\"search\":[\"#car,#selfie\",\"#audi,#selfie\"],\"sessionCookie\":\"IGSC275d5525f3b3c80923978446b68573e005943ece5d8b795754453f5683c02d3a%3AuJhzBqo1ap5JqClSw9fkqdcAIivxcmyS%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537249099.7028796673%7D\"}}" --header "Content-Type: application/json" --header "X-Phantombuster-Key-1: xlMBVPEdlW8KYfUMj8kUQyLNP332DcRb"
My POST Request Below ! ;-)
 

Вложения

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
More information below :

https://drive.google.com/open?id=19Blc7ca2UmPgVwPn4LQjWQYCXDKQ2x45

Код:
curl https://phantombuster.com/api/v1/agent/27521/launch --data "{\"output\":\"first-result-object\",\"argument\":{\"search\":[\"#happy,#selfie\",\"#car,#selfie\"],\"sessionCookie\":\"IGSC275d5525f3b3c80923978446b68573e005943ece5d8b795754453f5683c02d3a%3AuJhzBqo1ap5JqClSw9fkqdcAIivxcmyS%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537249099.7028796673%7D\"}}" --header "Content-Type: application/json" --header "X-Phantombuster-Key-1: xlMBVPEdlW8KYfUMj8kUQyLNP332DcRb"

Get Agent Record Pahntonbuster:
https://hub.phantombuster.com/v1/reference#getagentrecord-1


API HTTP EndPoint Documentation Phantombuster:
https://hub.phantombuster.com/reference?_ga=2.202098134.618567464.1537241776-439100320.1536889301#launchagent-1


https://drive.google.com/open?id=19Blc7ca2UmPgVwPn4LQjWQYCXDKQ2x45
Than you again fr your help or Idea ! ;-)
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
This part looks like escaped json.
Код:
"{\"output\":\"first-result-object\",\"argument\":{\"search\":[\"#car,#selfie\",\"#audi,#selfie\"],\"sessionCookie\":\"IGSC275d5525f3b3c80923978446b68573e005943ece5d8b795754453f5683c02d3a%3AuJhzBqo1ap5JqClSw9fkqdcAIivxcmyS%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537249099.7028796673%7D\"}}"
You should set Data type - application/json in your request settings and send unescaped json format data.
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
a yes the team of Phantombuster say me the same thing, i will think and try.

thank VladZen
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
I pulled all the backslashes out in there, does it hurt? I tried to curl, NdeJS or PHP in Data. I tried to change the data by first result, result with ouput, Container ID. nothing works.

Am i wrong ? Or another idea?
PHP:
<?php
$handle = curl_init('https://phantombuster.com/api/v1/agent/27521/launch');
curl_setopt_array($handle, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array(
        'X-Phantombuster-Key-1: xlMBVPEdlW8KYfUMj8kUQyLNP332DcRb',
        'Content-Type: application/json'
    ),
    CURLOPT_POSTFIELDS => '{"output":"result-object-with-output","argument":{"search":["#selfie,#car","#selfie,#audi"],"sessionCookie":"IGSC2c5ed891e54a7eb842e28ddb6c9146de04bd66c20d6cdb9f79a8d0dfc7d761ca%3AoMLzTi2XCBp0dl4AxwZcJlGxNIWd9rut%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537358017.0869891644%7D"}}'
));
$response = curl_exec($handle);
if($response === FALSE){
    echo 'Error: ' . curl_error($handle);
} else {
    echo $response;
    $decodedResponse = json_decode($response, TRUE);
}
?>
Container ID with NODEJS:

Код:
<?php
$handle = curl_init('https://phantombuster.com/api/v1/agent/27521/launch');
curl_setopt_array($handle, array(
    CURLOPT_POST => TRUE,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HTTPHEADER => array(
        'X-Phantombuster-Key-1: xlMBVPEdlW8KYfUMj8kUQyLNP332DcRb',
        'Content-Type: application/json'
    ),
    CURLOPT_POSTFIELDS => '{"output":"json","argument":{"search":["#selfie,#car","#selfie,#audi"],"sessionCookie":"IGSC2c5ed891e54a7eb842e28ddb6c9146de04bd66c20d6cdb9f79a8d0dfc7d761ca%3AoMLzTi2XCBp0dl4AxwZcJlGxNIWd9rut%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537358017.0869891644%7D"}}'
));
$response = curl_exec($handle);
if($response === FALSE){
    echo 'Error: ' . curl_error($handle);
} else {
    echo $response;
    $decodedResponse = json_decode($response, TRUE);
}
?>
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Do You send all that data in your POST request Content area ?

In POST request Url You have to add just : https://phantombuster.com/api/v1/agent/27521/launch
And in content area just your json content:
{"output":"result-object-with-output","argument":{"search":["#selfie,#car","#selfie,#audi"],"sessionCookie":"IGSC2c5ed891e54a7eb842e28ddb6c9146de04bd66c20d6cdb9f79a8d0dfc7d761ca%3AoMLzTi2XCBp0dl4AxwZcJlGxNIWd9rut%3A%7B%22_auth_user_id%22%3A7260454261%2C%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_auth_user_hash%22%3A%22%22%2C%22_platform%22%3A4%2C%22_token_ver%22%3A2%2C%22_token%22%3A%227260454261%3AgB6XGjLXrn1hX0oHYQMnLpXd3ikXchRT%3A153110b758d341cff87766420cbcbecc8566547cc393dba8fd2883ee17c2360e%22%2C%22last_refreshed%22%3A1537358017.0869891644%7D"}}
If You content in right then all should work.
If not post updated POST request example.
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Hello @lokiys , I try it but it doesn't work can you see the template below, please ?
 

Вложения

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hello @lokiys , I try it but it doesn't work can you see the template below, please ?
Hi. I do not see any problems with this action: https://i.imgur.com/bN4NlbZ.png
I have executed it and got answer:

Код:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 20 Sep 2018 09:48:13 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 52
Connection: keep-alive
Access-Control-Allow-Origin: *
ETag: W/"34-VEcFDBk2ONHlCK2oY7zH7A"
X-Frame-Options: DENY
X-Content-Type-Options: nosniff


{"status":"success","data":{"containerId":32930099}}
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Hi. I do not see any problems with this action: https://i.imgur.com/bN4NlbZ.png
I have executed it and got answer:

Код:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 20 Sep 2018 09:48:13 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 52
Connection: keep-alive
Access-Control-Allow-Origin: *
ETag: W/"34-VEcFDBk2ONHlCK2oY7zH7A"
X-Frame-Options: DENY
X-Content-Type-Options: nosniff


{"status":"success","data":{"containerId":32930099}}

Yes the action work on zennoposter OK but when you look at the API Action. When you want to change the Hashtag for example, it's doesn't change the data when you look at the LOG of the API Console on Phantombuster...

How can we change the data in the setting. because Zennoposter just launch and Abort the API, nothing else. SO if you don't control the API and the setting only with the API.

I want to use only GET And POST to control API, so i don't control the API like this...

How can i put correctly new # for example ? You can open a account for free on the plateform to try by yourself. https://phantombuster.com/login it's take 2 minutes to do it... @lokiys Thank you in advance.
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Yes the action work on zennoposter OK but when you look at the API Action. When you want to change the Hashtag for example, it's doesn't change the data when you look at the LOG of the API Console on Phantombuster...

How can we change the data in the setting. because Zennoposter just launch and Abort the API, nothing else. SO if you don't control the API and the setting only with the API.

I want to use only GET And POST to control API, so i don't control the API like this...

How can i put correctly new # for example ? You can open a account for free on the plateform to try by yourself. https://phantombuster.com/login it's take 2 minutes to do it... @lokiys Thank you in advance.
Sorry its too hard to answer. I really have to dig deep into all options of this and its not 2 minutes sorry :-)
But i can see you are on right way. Keep trying.
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Yes the action work on zennoposter OK but when you look at the API Action. When you want to change the Hashtag for example, it's doesn't change the data when you look at the LOG of the API Console on Phantombuster...

How can we change the data in the setting. because Zennoposter just launch and Abort the API, nothing else. SO if you don't control the API and the setting only with the API.

I want to use only GET And POST to control API, so i don't control the API like this...

How can i put correctly new # for example ? You can open a account for free on the plateform to try by yourself. https://phantombuster.com/login it's take 2 minutes to do it... @VladZen @rostonix @sergodjan66 @Mikhail B. @Hungry Bulldozer @ZennoScript I want to sell more than 100 templates , a loss of money for your staff... Thank you in advance.
 

kaboom

Client
Регистрация
23.01.2016
Сообщения
22
Благодарностей
6
Баллы
3
Yes the action work on zennoposter OK but when you look at the API Action. When you want to change the Hashtag for example, it's doesn't change the data when you look at the LOG of the API Console on Phantombuster...

How can we change the data in the setting. because Zennoposter just launch and Abort the API, nothing else. SO if you don't control the API and the setting only with the API.

I want to use only GET And POST to control API, so i don't control the API like this...

How can i put correctly new # for example ? You can open a account for free on the plateform to try by yourself. https://phantombuster.com/login it's take 2 minutes to do it... @VladZen @rostonix @sergodjan66 @Mikhail B. @Hungry Bulldozer @ZennoScript I want to sell more than 100 templates , a loss of money for your staff... Thank you in advance.

Maybe try this template,

I suppose you're french ->Skype: karnivore4949
 

Вложения

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Thank You Kaboom, i find my solution thank you All ! ;-)
 

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Hello everyone, I have a problem to switch from a data in a variable to a table without a file.
I made a regex to sort what I needed but I can't put my data in the table... In the settings of the "table processing" I had the columns "excluded":
For example, when I want to put in column B the regex column, I had the columns excluded: 0.2,3,3,4,5,5,6,7,8,9,10. Then for column C, I had the columns excluded: 0.1,3,3,4,5,6,7,8,9,10. And so on but it doesn't work that it gives me the data in the same 1st column and goes down on new lines....
How do you put a regex in a column of a table most simply in the world? Thank you in advance for your support;-)!My concern in the file below

Bonjour a tous, j'ai un soucis pour passer d'une donnees dans une variable pour la mettre dans une table sans fichier.
j'ai realise une regex pour trier ce que j'avais besoin mais je n'arrive pas a mettre mes donnees dans la table...Dans les reglages de la "table processing" j'ai fais "exclure les colonnes":
Par exemple , Quand je veux mettre dans la colonne B la colonne de regex, j'ai fais exclure les colonnes: 0,2,3,4,5,6,7,8,9,10. puis pour la colonne C, j'ai fais exclure les colonnes: 0,1,3,4,5,6,7,8,9,10. Et ainsi si de suite mais cela ne fonctionnement cela me mes les donnees dans la meme 1er colonne et descends sur de nouvelles lignes...
Comment faites vous pour mettre une regex dans une colonne d'une table le plus simplement du monde ? Merci d'avance pour votre soutien ; )! Mon soucis dans le fichier en dessous
 

Вложения

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)