How to write specification file for OAuth client credentials to publish API into developer portal in apigee edge?

sravanig231
Participant III

Hello Team,

I want to publish my OAuth client credentials API into developer portal for that I write specification file and published the product into developer portal but while testing my api in portal iam getting Unknown error.

I added CORD and options preflight condition also but still Iam getting error in portal.

Thank you.

0 4 208
4 REPLIES 4

Not applicable

in OpenAPI 2.0 (in this case, application) rather than those used in OpenAPI 3.0 (clientCredentials)

.below is how it looks in 3.0

components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      description: See http://developers.gettyimages.com/api/docs/v3/oauth2.html
      flows:
         clientCredentials:
           tokenUrl: https://api.gettyimages.com/oauth2/token/
          scopes: {}

Thank you for your quick response Priyadarshi,

Here Iam creating Provider API. And i want to use that provider API URL in my consumer API spec file, in that case how i will pass parameters to provider API for token generation(client credentials and grant type)?

Not applicable

Then you have to write the token generation api as your endpoint and specify as how you write for a service.

Hello,

we added client credentials security schemes(with token end point) in our consumer api and added both provider and consumer api to same product, added product to app and published to portal.
In portal authorisation is failing after adding correct client id and client secret .