Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

user:create ignores account configuration #158

Closed ruXlab closed 6 years ago

ruXlab commented 6 years ago

Steps to reproduce

I was trying to create a user using nexmo-cli(beta):

➜  ~ nexmo user:create foo 
Could not read credentials. Please run 'nexmo setup' to setup the CLI. (ENOENT: no such file or directory, open '/home/rzaharov/.nexmo-app')

I double checked configuration, it seems working fine for other type of commands:

➜  ~ nexmo balance
20.36 EUR

I have tried to remove ~/.nexmorc file and setup client again using nexmo setup XXX YYY. Unfortunately it didn't help

System configuration

Node version: v4.2.6 NPM version: 3.5.2 Operating system: Ubuntu 16.04 64x nexmo-cli: 0.4.3-beta-2

mheap commented 6 years ago

Hey @ruXlab, there are two config files. ~/.nexmorc contains your API key and secret which is what's used for nexmo balance.

You need to create an application (which will create .nexmo-app) and run nexmo user:create in the same directory. This file contains an application ID and private key, so that you don't have to keep passing those values in for every command

ruXlab commented 6 years ago

Thank you for clarification It would be better if error says something like create application first as suggested command nexmo setup will not help to resolve issue

AlexLakatos commented 6 years ago

Fixed on the beta branch now, can you please install the latest beta? npm install -g nexmo-cli@beta