Connect Reactor API with Python | Community
Skip to main content
New Participant
August 28, 2023
Solved

Connect Reactor API with Python

  • August 28, 2023
  • 1 reply
  • 1308 views

Hello Community,

I am trying to connect and pull data of Adobe Launch using Reactor API in Python. 

I created my project in Adobe Developer console and got all credentials (validated the APIs are working in Postman)

 

Following is my python script: 

Line 1:

myHeaders = {All headers required for reactor API}

 

Line 2:

import requests
res = requests.get("https://reactor.adobe.io/companies/{COMPANY_ID}/properties", headers=myHeaders)

I am getting following error, please help and guide.

SSLError: HTTPSConnectionPool(host='reactor.adobe.io', port=443): Max retries exceeded with url: /companies/{COMPANY_ID}/properties (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1002)')))

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by _Manoj_Kumar_

Hello @saurabhch 

In your requests, pass verify=false. This will disable the SSL verification and you won't see the error.

 

import requests res = requests.get("https://reactor.adobe.io/companies/{COMPANY_ID}/properties", headers=myHeaders,verify=False)

1 reply

_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
August 31, 2023

Hello @saurabhch 

In your requests, pass verify=false. This will disable the SSL verification and you won't see the error.

 

import requests res = requests.get("https://reactor.adobe.io/companies/{COMPANY_ID}/properties", headers=myHeaders,verify=False)
     Manoj     Find me on LinkedIn
SaurabhChAuthor
New Participant
September 8, 2023

Thanks @_manoj_kumar_ for your message. It worked; do you have any experience doing data manipulation of the JSON received from the API response. I want to change the format or make the custom code more representable when I am pulling a rule via API. Any direction is appreciated.

I tried importing python in-build JSON library, but it didn't help me a lot. 

The end goal of this data manipulation is to upload my all rules with custom code in GitHub for records.

SaurabhChAuthor
New Participant
September 28, 2023

Following up on this, does anybody can share their experience working with data manipulation from the API response in Python? I am trying to change format of custom code pulled from API to normal html/javascript which we can see in Adobe Launch. For now I can see something like this in the response of custom code via API:

"\n<!DOCTYPE html>\n<html lang=\"en-us\">\n<head>\n<title>Google Data...