Hi everyone,
I’m currently integrating the Aides Entreprises API into a GPT Action, and I’m running into some challenges related to the authentication setup. Here’s a detailed explanation of the issue I’m facing:
Context:
The API I’m working with requires two headers for authentication:
- X-Aidesentreprises-Id
- X-Aidesentreprises-Key
In the Custom Actions interface, there’s an option to add an API key through a specific window where I can input a custom header (I set this to X-Aidesentreprises-Key
). However, the API also requires me to pass the second header X-Aidesentreprises-Id, and this is where I’m getting stuck.
The Issue:
When I attempt to define two security schemes in my OpenAPI file, I encounter the following error:
csharp
Copier le code
Found multiple security schemes, only 1 is supported
Additionally, I’m seeing schema-related errors in the YAML file:
csharp
Copier le code
In components section, schemas subsection is not an object
It seems GPT only supports one security scheme at a time, and I’m not sure how to handle this.
My Questions:
- Should I input one of the authentication headers in the API key configuration window and the other in the OpenAPI schema?
- How can I correctly configure the authentication to send both
X-Aidesentreprises-Id
andX-Aidesentreprises-Key
? When I try creating two security schemes in the YAML file, it doesn’t seem to work. - Is there a way to combine both headers into a single security scheme in OpenAPI?
Here’s the current configuration and schema that I’m working with:
yaml
Copier le code
openapi: 3.1.0
info:
title: Aides Entreprises API
description: API to retrieve public aid information for companies in France.
version: 1.0.0
servers:
- url: https://api.aides-entreprises.fr/v1.1
description: Main API for Aides Entreprises
paths:
/aides:
get:
operationId: getAides
summary: Retrieve a list of aids
parameters:
- name: region
in: query
description: Region where the company is located
schema:
type: string
responses:
'200':
description: List of aids
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-Aidesentreprises-Key
ApiIdAuth:
type: apiKey
in: header
name: X-Aidesentreprises-Id
security:
- ApiKeyAuth: []
- ApiIdAuth: []
Thanks in advance for your help! I’m looking for any suggestions on how to resolve this issue.