How to get DialogFlows certification token?

Not applicable

We request sound data from Apigee to Dialogflow(V2) and want to get the response of the text.
However, therefore a certification token is necessary. (a part of following "XXXXXXXXXXXXXXXXXXX")

(example) Authorization: Bearer XXXXXXXXXXXXXXXXXXX

In addition, We want to acquire a certification token only at http request without using the gcloud commands.
Because our environment is not alllowed to install libraries.

To acquire a certification token only in apigee,
Q1: What kind of policy should I use?
Q2: In addition, what kind of code should I write in the policy?
Q3: I want to have a sample if possible.

Solved Solved
0 2 335
1 ACCEPTED SOLUTION

For most Google Cloud APIs , you can use an RFC7523 grant type to get a token that allows service-to-service requests.

This repo shows how you can do that. It has an Apigee Edge proxy that connects to Firebase. But I think it would be the same security for DialogFlow.

Short summary: you CAN use policies - a combination of ServiceCallout, LookupCache, PopulateCache, AssignMessage, and others - to create logic that can request and maintain the token required for DialogFlow. But it's much easier to do the management of the token in nodejs. That's what the code in the repo shows.

View solution in original post

2 REPLIES 2

For most Google Cloud APIs , you can use an RFC7523 grant type to get a token that allows service-to-service requests.

This repo shows how you can do that. It has an Apigee Edge proxy that connects to Firebase. But I think it would be the same security for DialogFlow.

Short summary: you CAN use policies - a combination of ServiceCallout, LookupCache, PopulateCache, AssignMessage, and others - to create logic that can request and maintain the token required for DialogFlow. But it's much easier to do the management of the token in nodejs. That's what the code in the repo shows.

Thank you very much.
It was solved by your advice.