Help Needed: Using Trello API with CustomGPT on OpenAI's ChatGPT - Base64 Authentication Issue
Asked by Gera Yeremin:

#### Context:  
We are trying to integrate Trello's API with CustomGPT on OpenAI's ChatGPT. The goal is to fetch boards and create cards using Trello's API. We have an API key and a token, and we are exploring how to use Base64 encoding for authentication.

#### Steps Taken:  
1. \*\*API Key and Token\*\*: We obtained the API key and token from Trello.  
2. \*\*Base64 Encoding\*\*: Combined the key and token in the format \`key:token\` and encoded it to Base64.  
- Example: \`f95df4a0fb0f261c4f180df9abf26d40:ATTAd7c5a0ddef9acc593e5f5d4dbaab56e49e8d134d55b01f82929f4ac98f8c460e4F9A0B8B\`  
- Encoded: \`Zjk1ZGY0YTBmYjBmMjYxYzRmMTgwZGY5YWJmMjZkNDA6QVRUQWQ3YzVhMGRkZWY5YWNjNTkzZTVmNWQ0ZGJhYWI1NmU0OWU4ZDEzNGQ1NWIwMWY4MjkyOWY0YWM5OGY4YzQ2MGU0RjlBMEI4Qgo=\`  
3. \*\*OpenAPI Spec\*\*: Tried to include this Base64 encoded string in the \`Authorization\` header.

#### Issues Encountered:  
- When using the \`Authorization\` header, the OpenAPI spec ignored the header.  
- When trying to pass the key and token as query parameters, the API responded with authentication errors.

#### Questions:  
1. How can we correctly integrate the Base64 encoded API key and token in the OpenAPI spec for Trello API?  
2. Is there a more suitable approach to authenticate Trello API requests in the CustomGPT environment?

### OpenAPI Specification (Latest Attempt):

\`\`\`yaml  
openapi: 3.0.0  
info:  
title: Trello API  
description: API specification for interacting with Trello.  
version: 1.0.0  
servers:  
- url: <https://api.trello.com/1>  
paths:  
/members/me/boards:  
get:  
operationId: getAllBoards  
summary: Get all boards for the authenticated user  
parameters:  
- name: key  
in: query  
required: true  
schema:  
type: string  
- name: token  
in: query  
required: true  
schema:  
type: string  
responses:  
'200':  
description: A list of boards  
content:  
application/json:  
schema:  
type: array  
items:  
$ref: '#/components/schemas/Board'  
/cards:  
post:  
operationId: createCard  
summary: Create a new card on a specific board  
parameters:  
- name: key  
in: query  
required: true  
schema:  
type: string  
- name: token  
in: query  
required: true  
schema:  
type: string  
requestBody:  
required: true  
content:  
application/json:  
schema:  
$ref: '#/components/schemas/Card'  
responses:  
'200':  
description: The created card  
content:  
application/json:  
schema:  
$ref: '#/components/schemas/Card'  
components:  
schemas:  
Board:  
type: object  
properties:  
id:  
type: string  
name:  
type: string  
desc:  
type: string  
Card:  
type: object  
properties:  
id:  
type: string  
name:  
type: string  
desc:  
type: string  
idList:  
type: string  
securitySchemes:  
ApiKeyTokenAuth:  
type: apiKey  
in: query  
name: key  
security:  
- ApiKeyTokenAuth: \[\]  
\`\`\`

Any guidance on this would be highly appreciated!


Answers:
author: milynnus
body: [@Gera Yeremin](/t5/user/viewprofilepage/user-id/5501844)

As far as I know you cannot work programmatically with Custom GPT but you can with Assistant. In this case it will be with functions. The actual function need to be provided by you.   

in working with GPT for a Guesty user, we provided a micro for the services to retrieve past inbox conversations with the schema taken from the open api json provided by Fastapi /docs page. The token is part of environment variables.

comments: author: Gera Yeremin
body: I wonder why it won't work with customgpts from open AI?  

I ran into issues with using this app:  
<https://app.dataforseo.com/api-dashboard>  

but with some help from support we merged the username and pass into one key via base64 and got it working. There must be a work around Is there a way to reach out to developers who work at Trello with this question?  

This must be at least something they are working on.


author: Rabbit Consulting
body: My God!  

Gera, thank you so much!

I am a terrible planner and was looking for a solution.  
This costed me ten days. You have no idea how happy I am!  

Thanks!  

Nils


author: Matt
body: Hey,

Did you get this working please?

Custom GPT API connected to Trello?


author: milynnus
body: [@Matt](/t5/user/viewprofilepage/user-id/5569878)

As far as I know you cannot work programmatically with Custom GPT but you can with Assistant. In this case it will be with functions. The actual function need to be provided by you.


author: Dreamsuite Mike
body: Hi [@Gera Yeremin](/t5/user/viewprofilepage/user-id/5501844)

You can try to post this in [Trello Developer Community](https://community.developer.atlassian.com/c/trello/42)