Mizlul
Mizlul

Reputation: 2290

dialogflow entreprise edition not showing access token key

I have two different accounts for Google DialogFlow one with Entreprise Edition and the other Normal Account. I used to work with non-Entrepreise Dialogflow and i was able to get access token from the settings but on Entrepresie Edition Access keys are not showing.

I have access into google console and I can see there is a service account key but when I try to use this key on the http call on the Header Authorization I get not Authorized 401.

Anyone knows how can I still use DialogFlow V1 with entreprise edition and create the access token so I can use it to make the http call to dialogflow api!

Screenshot of both accounts: entreprise enter image description here

normal enter image description here

Code for using DialogFlow Api:

function postData(url, data) {
    console.log(JSON.stringify(data));
    return fetch(url, {
        body: JSON.stringify(data),
        // cache: 'no-cache',
        // credentials: 'same-origin',
        headers: {
            'content-type': 'application/json',
            "Authorization": "Bearer " + configs.accessToken,
        },
        method: 'POST',
        mode: 'cors',
        redirect: 'follow',
        referrer: 'no-referrer',
    })
        .then(response => response.json()) // parses response to JSON
}

Upvotes: 0

Views: 809

Answers (2)

Mizlul
Mizlul

Reputation: 2290

If anyone still interested to know For Entreprise Edition there is only V2 available, so my V1 code wont work here which is pretty sad and annoying! Where is backward compatibility google?

https://dialogflow.com/docs/agents

API Version: API version for agent. Select V2 API for all new agents. Dialogflow Enterprise Edition only supports the V2 API, so the API version cannot be selected.

Upvotes: 1

Stiben
Stiben

Reputation: 104

I understand that when we use DialogFlow Enterprise Edition, the only way to connect to it is by using the "project ID". For example, I use the next command in Python:

session = session_client.session_path(project_id, session_id)

In addition, there can be just one enterprise agent for each Google Cloud project.

Upvotes: 0

Related Questions