Good afternoon, why do I get this error when trying to launch the gc commands?
The profile named DEFAULT passed can not be located in the config file.
Good afternoon, why do I get this error when trying to launch the gc commands?
The profile named DEFAULT passed can not be located in the config file.
Hi,
The error you are receiving is because you do not have (or the cli for some reason can not find) the config.toml file that contains your OAuth client credentials.
The cli needs to have an OAuth client credentials profile setup for it. If you not have done this yet you can run the gc profiles new and answer the questions. This creates a config.toml file located in you $HOME/.gc directory. The CLI should always look for this file in that directory.
A couple of quick questions:
Thanks,
John
I already installed the CLI, and created a new profile, but it keeps giving me that error.
Install it on windows 10.
thnx
Hi,
Thanks. I am going to get one of our windows machines and see if I can reproduce the problem.
Can you try to create the following file in the directory where you installed the gc.exe binary and call it config.toml? Make sure you change the values specific to that. Then try to run gc.exe in the directory where the binary and the config.toml file is located.
[default]
client_credentials = "OAUTH CLIENT ID HERE"
client_secret = "OAUTH_CLIENT_SECRET HERE"
environment = "mypurecloud.de"
Please let me know the results. The way our config resolution works is that if it can not find the config.toml in the home directory it tries to look in the same directory. In the meantime I will work on my end and see if I can reproduce the problem.
Thanks,
John Carnell
Manager, Developer Engagement
Hi,
Thanks for the help, I had to generate the config.toml file manually because although the new profile is generated correctly, the file is not generated automatically.
Hi,
Interesting. I just downloaded the latest version of the cli on Windows 10 and had no issues. Couple of quick thoughts:
Thanks,
John Carnell
Hi,
Create the profile via gc profiles, the config.toml file is at C: \ platform-client-sdk-cli-main \ build \ gc, and I'm running under cmd.
Good evening, it worked for me, I had generated the .gc file in another place and had not seen it.
Thanks a lot!!!
I have a question to generate a new queue for example, the command would be this?
gc queues create EXAMPLE
Hi,
Sweet! I was worried for a minute because I literally got mine working on my Windows 10 box and had no problems.
To create a queue using the CLI you need to either put your JSON payload for creating a queue in a file and then call:
gc queues create -f
YOUR file.
Your file could contain a JSON body like this:
{"name": "chat4"}
or pipe it from STDOUT. In linux this would be
echo '{"name": "chat4"}' | gc queues create | jq -r .id
In powershell I believe it is this:
c:\PowerShell -Command "echo \'{"name": "chat4"}\' | gc queues create | jq -r .id
We have a couple of resource that can help including:
Finally, we did not expose all of our public APIs in the CLI. If you have Public APIs that are are not exposed in the CLI, please let me know as it often takes us just a little bit of time to add them. We just did not want to flood the CLI with so many commands so that it makes it difficult to understand how to use.
Thanks,
John Carnell
Manager, Developer Engagement
Thnx Jhon!
Hi John,
When I try for example to create two users at the same time, it does not allow me. And I have validated that the json is correct, can you tell me why?
Thanks
{
"name": "prueba2",
"email": "pru22@sh.es",
"password": "11111",
"name": "prueba5",
"email": "pru22@sh.es",
"password": "1111@"
}
Hi,
Your JSON is incorrect. The JSON has to mirror the public. The API takes one record at a time so you would need 2 files each with each file containing a single user record. In Linux, I could create the files and then do the following command to list each file in the directory and pipe them over to a gc command:
ls data/*.json | xargs -I{} gc users create -f {}
I am sure Powershell could do something similar.
Thanks,
John Carnell
Manager, Developer Engagement
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.