How to send api key for multiple apis?

Mansi Gusain
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 20, 2025

Hi , I am using two apis- /spaces and /pages in the same schema for enabling actions for agent. Both are on same server and use same authentication token. I am unable to use the actions together but individually they work great and as expected. I am facing issue with the passing of token. 

 

 

This is the schema: 

 

openapi: 3.1.0 info: title: Custom Atlassian API version: 1.0.0 servers: - url: https://name.atlassian.net description: Custom Atlassian server paths: /wiki/api/v2/spaces: get: operationId: getSpacesId summary: Retrieve space information description: Get the ID of a space filtered by keys. parameters: - in: query name: keys required: true description: Keys to filter spaces by. schema: type: string security: - basicAuth: [] responses: '200': description: The space ID. content: application/json: schema: type: object properties: id: type: string description: The ID of the space. /wiki/api/v2/pages: post: operationId: createPage summary: Create a new page description: Create a new page in a specified space. requestBody: required: true content: application/json: schema: type: object properties: spaceId: type: string description: The ID of the space. status: type: string enum: [current] description: The status of the page. title: type: string description: The title of the page. body: type: object properties: representation: type: string enum: [storage] description: The format of the body. value: type: string description: The content of the page. security: - basicAuth: [] responses: '201': description: The page was created successfully. components: securitySchemes: basicAuth: type: http scheme: basic

 

 

When I pass the email:token it fails with this log -

 

2025-02-21T07:39:20.649193696Z {"level":"error","message":"[handleAbortError] AI response error; aborting request: algorithm.iv must contain exactly 16 bytes","stack":"OperationError: algorithm.iv must contain exactly 16 bytes\n at validateByteLength (node:internal/crypto/util:440:11)\n at asyncAesCbcCipher (node:internal/crypto/aes:134:3)\n at Object.aesCipher (node:internal/crypto/aes:210:28)\n at cipherOrWrap...","timestamp":"2025-02-21T07:39:20.649Z"}

 

 

 

To handle this I encoded it to base64 but then actions to get and create do not get authenticated. 

The issue is related to key only. Please help. 

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events