Version ie v5.11.67
Environment: Docker
Checklist
- The problem could not be replicated on the demo.
- Yes, I searched, nothing like my problem.
- Unfortunately, there is nothing useful in the logs.
Describe the bug
I’ve created my own gpts in the chatgpt.
I created an action
I have created and added a token.
the scheme used:
openapi: 3.0.3
info:
title: Invoice Ninja API
version: '1.0'
servers:
- url: server
paths:
/api/v1/invoices:
get:
summary: Gauti sąskaitų sąrašą
operationId: getInvoices
parameters:
- name: client_id
in: query
description: Filtruoti sąskaitas pagal kliento ID
required: false
schema:
type: string
- name: page
in: query
description: Puslapio numeris
required: false
schema:
type: integer
- name: per_page
in: query
description: Sąskaitų skaičius puslapyje
required: false
schema:
type: integer
- name: include
in: query
description: Įtraukti susijusius duomenis (pvz., klientus)
required: false
schema:
type: string
- name: X-Requested-With
in: header
description: Naudojamas nurodyti XMLHttpRequest
required: true
schema:
type: string
example: XMLHttpRequest
responses:
'200':
description: Sąskaitų sąrašas
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
id:
type: string
number:
type: string
amount:
type: number
balance:
type: number
status_id:
type: integer
client_id:
type: string
created_at:
type: integer
updated_at:
type: integer
due_date:
type: string
format: date
invoice_date:
type: string
format: date
meta:
type: object
properties:
pagination:
type: object
properties:
total:
type: integer
count:
type: integer
per_page:
type: integer
current_page:
type: integer
total_pages:
type: integer
security:
- ApiKeyAuth: []
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-TOKEN
The problem:
[debug] Calling HTTP endpoint
{
"domain": "server",
"method": "get",
"path": "/api/v1/invoices",
"operation": "getInvoices",
"operation_hash": "603369ae403381720326a09c425634e602263cd9",
"is_consequential": false,
"params": {}
}
[debug] Response received
{
"response_data": {
"message": "Malformed JSON payload.",
"error": "Invalid JSON data provided"
},
"status_code": 400,
"action_id": "g-d65a584cb3af9d0ef183afaa7f6d520d76d8b461"
}
[debug] Failed Outbound Call
{
"text_raw": {
"response_data": {
"message": "Malformed JSON payload.",
"error": "Invalid JSON data provided"
},
"status_code": 400,
"action_id": "g-d65a584cb3af9d0ef183afaa7f6d520d76d8b461"
},
"http_status": 400,
"domain": "server",
"method": "get",
"path": "/api/v1/invoices",
"operation": "getInvoices",
"operation_hash": "603369ae403381720326a09c425634e602263cd9",
"is_consequential": false,
"params": {}
}
I’ve tried many schemes, all based on the same error:
"response_data": {
"message": "Malformed JSON payload.",
"error": "Invalid JSON data provided"
}
while curl works fine.
PS C:\my> Invoke-RestMethod -Method Get -Uri "server/api/v1/invoices" -Headers @{"X-API-TOKEN" = $token}
data
----
{@{id=VolejRejNm; user_id=VolejRejNm; project_id=;.....
It could be a chatgpt openapi problem, maybe someone can advise/help.