Creating a Microsoft Power Apps/Automate connector

Hi there,

I'm trying to create a custom connector within MS Power Apps to run some API requests.
Everything works in Postman, but I can't get it to work in MS Power Apps.
Here's how I'm creating the connector, and please let me know if I'm missing or doing something incorrectly.

  1. General information for the connector.

host is: api.usw2.puere.cloud

  1. next I create the type of auth.

  1. last I define the request

In Swagger editor it looks like this

This is what I get then I test the connector.

Your last image doesn't show anything. Can you repost it?

Where did you get that swagger definition? it's very incorrect. You can find the swagger definition here: https://api.usw2.pure.cloud/api/v2/docs/swagger.

Thanks for that @tim.smith
the swagger definition is automatically generated with the input screens when the MS Power Apps connector is created.
I'm not too familiar with swagger, so I was hoping you can point me where I'm going wrong in the definition. Is there a section that's incorrect, or the whole thing is wrong?

I changed it a little bit but still not working


swagger: '2.0'
info: {title: Genesys, description: '', version: '1.0'}
host: api.usw2.pure.cloud
basePath: /
schemes: [https]
consumes: []
produces: []
paths:
/api/v2/quality/evaluations/query:
get:
responses:
default:
description: default
schema: {}
summary: Genesys
operationId: GetEvaluation
parameters:
- {name: evaluatorUserId, in: header, required: true, type: string}
- {name: Content-Type, in: header, required: false, type: string}
description: test
definitions: {}
parameters: {}
responses: {}
securityDefinitions:
oauth2_auth:
type: oauth2
flow: accessCode
authorizationUrl: https://login.usw2.pure.cloud/oauth/authorize
tokenUrl: https://login.usw2.pure.cloud/oauth/token
scopes: {'quality quality:readonly': 'quality quality:readonly'}
security:

  • oauth2_auth: ['quality quality:readonly']
    tags: []

When I try to test it I get this

and this is the redirect link that's provided by MS Power Apps

I really appreciate your help !!

I don't have any experience with Power Apps, but if you can import from a swagger definition, that's probably the easiest way to go. Otherwise, if you can paste into the swagger definition window above, grab the parts you need from the swagger definition I linked above and run them through a JSON to YAML converter (like https://json2yaml.com/).

If it has to be done by hand, compare with the swagger definition or the API endpoint docs for GET /api/v2/quality/evaluations/query. At a glance, most of the parameters are incorrect and it's missing the response definitions entirely.

Regarding the error screenshot, that's happening before the request is made, so its configuration isn't relevant yet. The error is because the redirect URI that's being sent in the login redirect doesn't match one that's been configured for the client ID that was also sent in the redirect. Make sure that whatever it's sending is configured on your oauth client and it's making the redirect in accordance with the Genesys Cloud documentation. I assume it's doing an auth code flow based on the presence of a refresh token URI, which can be found here: https://developer.genesys.cloud/api/rest/authorization/use-authorization-code.

Thanks @tim.smith you pointed me in the right direction. I had the incorrect auth type in Genesys. I think I can get the rest done.
Much appreciated!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.