F.A.Q.

API Errors - Causes and Solutions

  • 3 February 2023
  • 1 reply
  • 296 views
API Errors - Causes and Solutions
Userlevel 7

Here we list some possible errors and solutions that may occur when using the API to perform some action or obtain data:
 

🔎”Invalid token" error

For this type of error check the header(s). Two items are required: Authorization and Content-Type.
 

> "Authorization": "Bearer USER_TOKEN",

> "Content-Type": "application/json"

G0Q_qsIF7S-PrLQ9qFiTmJgBDarU0M9TG1OL2Ud3fQakJIdU9QivdEsrEWll4RFcQ2JxRr0Yfy7XVgqUx3_XRxeYw9_WDd1MfoQYLqVYaRyFXptOd-RzOUL_dKL4cOgYSsIyu0XH19aYrPDr48gX4_s32xkTOkfAz34RmykC0u3wwjFxh7wPbi3nzSgdDA

For the token, the user needs the "longer" token, not the token from the user screen, but the one from https://app.pipefy.com/tokens

It is quite common not to add the Bearer before the token or to add the token with quotes, so just add the Bearer or remove the quotes from the token. Ex: "Barier 'token' "

 

For third party systems like Postman, the correct usage is this one:

0o37J_yQdWlBAb6NEGxxBd-R5IYaHUJYvuPq0odPjAnYbTEXVlppSIYTOJBJv09o9ApiqHzvASxrGRNR8TNJLgd7GyB3w4zRAHMwrxfT1vgo5tPsonPTi2UR5t8niL5_2-ZybSbQH7RJglaMV4HL-ZW0AVB1wvh47NXOU8k8WnM8GrxV9XEnHchrIZhZgQ


 

🔎Wrong use of link
Sometimes the link used can be https://app.pipefy.com/graphiql ou app.pipefy.com/graphiql instead of https://api.pipefy.com/graphql in the header, and this also returns a permission error.A5LNbAGxllxYZyUe7o2aqQIEYGVP_qc4B1u_TtL18qQgTk2NePnVwc9AOBR4PDHCgElDWmXvRvjyUDNUQe3xTumCrHgWESrP7MRlH_i109jSXUHpamoqsWK2PwSGhYPyzLRlWOb0Rj0E9rclxCJ3O9MPa8sVVUZqTBDB66aZCVHuUDfSXbQKdRmst8ziJw

 

 

🔎Code problems

For problems in the code, you can go to the developer > example for page and check the format of the calls: https://developers.pipefy.com/reference#graphql-endpoint

_LN29T-ZGHp5cw_ULHQeW0ZnRMzIVG9rCahkonmqoA5BFUVD_Kgxp6GGlCRapliJ40DO8wjIBapBdEV9joiNJDhl9g5c-AKvlx-hVxwyANG4FKu2sGxczLaIBSoPXiXAtcHmgiq4ykRUKc5nVrJNeRCtVfsmsDJ5jImQpuCSYwYZ695D1cpmHFSZHtoYAw

 

1) Paste the query from graphql

2) Paste Bearer USER_TOKEN

3) Paste application/json

4) See which languages are available to check the example.

 

 

🔎Field errors

Field errors is usually a type problem:
 

Field type: "assignee", Example value:[00000, 00001] - User ID

Field type: "checklist_vertical", Example value: ["a", "b"] - Values must be identical to the field options.

Field type: "checklist_horizontal", Example value: ["b"] - Values must be identical to the field options.

Field type: "cpf", Example value: "123.456.789-00

Field type: "cnpj", Example value: "12.345.678/1234-00"

Field type: "date", Example value: "1977-01-20

Field type: "date_time", Example value: "2017-07-20T21:00:00+00:00"

Field type: "due_date", Example value: "2017-07-20T21:00:00+00:00"

Field type: "currency", Example value: "9500.50

Field type: "label_select", Example value: [890073, 908006] - Values must be from the label ID (you can see it in query queries)

Field type: "email", Example value: "rocky.balboa@email.com"

Field type: "number", Example value: 9000

Field type: "short_text", Example value: "Rocky Balboa

Field type: "long_text", Example value: " any text any text any text any text."

Field type: "radio_vertical", Example value: "yes" - Only one option and identical to the field option

Field type: "radio_horizontal", Example value: "no" - Only one option and identical to the field option

Field type: "phone", Example value: "+55 11 1234-5678

Field type: "select", Example value: "B. Rocky Balboa II" - Only one option and identical to the field option

Field type: "time", Example value: "17:25


1 reply

Userlevel 7
Badge +12

Very helpful, thanks!

Reply