cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

multiple apiKey header parameters in custom connector

I want to create a custom connector to a Rocket.chat server.

The rocket.chat REST API requires two apiKey header parameters (X-Auth token and X-User-Id)

 

I was able to design a first working api in the Swagger editor in powerapps, with successful testing (in the Swagger editor).

 

swagger: '2.0'
info: {title: Rocket-Chat REST API, version: '1.0', description: Rocket-Chat Connector}
host: my.server.test:3000
schemes: [http, https]
produces: [application/json]
consumes: [application/json]
paths:
  /chat.postMessage:
    post:
      summary: Post a Message
      operationId: chat.postMessage
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              ts: {type: integer}
              channel: {type: string}
              message:
                type: object
                properties:
                  msg: {type: string}
                  _id: {type: string}
              success: {type: boolean}
          examples:
            example-1:
              ts: 1481748965123
              channel: general
              message:
                alias: ''
                msg: This is a test!
                parseUrls: true
                groupable: false
                ts: '2016-12-14T20:56:05.117Z'
                u: {_id: y65tAmHs93aDChMWu, username: graywolf336}
                rid: GENERAL
                _updatedAt: '2016-12-14T20:56:05.119Z'
                _id: jC9chsFddTvsbFQG7
              success: true
      description: ''
      security:
      - authToken: []
      - userId: []
      parameters:
      - in: body
        name: body
        schema:
          type: object
          properties:
            channel: {type: string}
            text: {type: string}
        x-examples:
          example-1:
            alias: Gruggy
            avatar: http://res.guggy.com/logo_128.png
            channel: '#general'
            emoji: ':smirk:'
            roomId: Xnb2kLD2Pnhdwe3RH
            text: Sample message
            attachments:
            - audio_url: http://www.w3schools.com/tags/horse.mp3
              author_icon: https://avatars.githubusercontent.com/u/850391?v=3
              author_link: https://rocket.chat/
              author_name: Bradley Hilton
              collapsed: false
              color: '#ff0000'
              fields:
              - {short: true, title: Test, value: Testing out something or other}
              - {short: true, title: Another Test, value: '[Link](https://google.com/)
                  something and this and that.'}
              image_url: http://res.guggy.com/logo_128.png
              message_link: https://google.com
              text: Yay for gruggy!
              thumb_url: http://res.guggy.com/logo_128.png
              title: Attachment Example
              title_link: https://youtube.com
              title_link_download: true
              ts: '2016-12-09T16:53:06.761Z'
              video_url: http://www.w3schools.com/tags/movie.mp4
          example-2: {}
definitions: {}
basePath: /api/v1
securityDefinitions:
  authToken: {type: apiKey, in: header, name: X-Auth-Token}
  userId: {type: apiKey, in: header, name: X-User-Id}
security:
- authToken: []
- userId: []

 

The problem occurs when I try to update the connector. 

PowerApps removes the second apiKey from the Swagger-Scheme.

 

Please add support for multiple apiKey header parameters!!
Or is there any option that I have overlooked to get around this problem?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: multiple apiKey header parameters in custom connector

Hi @m-unkel,

 

Unfortunately multiple API keys in custom connectors is not supported yet.

You can however submit an idea here for this.

 

Thank you,

Ovidiu

View solution in original post

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: multiple apiKey header parameters in custom connector

Hi @m-unkel,

 

Unfortunately multiple API keys in custom connectors is not supported yet.

You can however submit an idea here for this.

 

Thank you,

Ovidiu

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,887)