Skip to main content

Hi, could you show me what is wrong? 
import requests

url = "https://api.pipefy.com/graphql"

payload = """{ "query": "{ pipe (id: 549212) {name}}"}"""
headers = {
'authorization': "Bearer xxxxxx",
'content-type': "application/json"
}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

When I executed this, give me the error:
{"errors"::{"message":"no \"data\" or \"errors\" in response from origin"}]}

Thank you

Hey Paulo, how are you? 

 

The escaping in your request is not correct. 

 

Here the request in Python: 

 

import requests

url = "https://api.pipefy.com/graphql"

payload = {"query": "{ pipe (id: 549212) {name}}"}
headers = {
"authorization": "Bearer YOUR_TOKEN",
"content-type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

 

 

We have a console in our developers page to help you with Pipefy API requests in cURL, Node, Ruby, JS and Python.

 

 

https://developers.pipefy.com/reference#graphql-endpoint


Reply