Nexmo / nexmo-cli

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

Returns empty list of members in a conversation when there are actual members #201

Closed tchan408 closed 5 years ago

tchan408 commented 5 years ago

Steps to reproduce

npm install nexmo-cli@beta -g ...../.nvm/versions/node/v11.7.0/bin/nexmo -> ...../.nvm/versions/node/v11.7.0/lib/node_modules/nexmo-cli/lib/bin.js

{ "user_id": "USR-6dfc7540-5976-4894-a230-334d7bf0e677", "name": "jennifer", "user_name": "jennifer", "state": "JOINED" } ]

Expected behavior

nexmo ml CON-7773b084-859a-4a74-a256-ff519b5a44ae should return a list of members

Actual behavior

it returns No members

System configuration

Node version:

NPM version:

Operating system:

AlexLakatos commented 5 years ago

Hi @tchan408, I can't seem to reproduce your issue. Can you try again, maybe check the private_key / app_id combo stored in your .nexmo-app file or try with a clean app?

Screen Shot 2019-05-01 at 10 32 06
tchan408 commented 5 years ago

Thank you Alex!

1) Your reply made me realize that I did not have .nexmo-app file. I forgot since I created a new project and created the voice app using CD and not CLI. I did not remember that CLI needs a also .nexmo-app file (per https://developer.nexmo.com/client-sdk/in-app-messaging/guides/simple-conversation) which information is not yet in https://github.com/Nexmo/nexmo-cli/blob/master/README.md)

2) When nexmo-app file is missing or has wrong content, "nexmo ml" and "nexmo ma" have inconsistent return codes

nexmo member:list CON-bf94e4b8-9309-4f41-8563-c6914588908e -v No members

nexmo member:add CON-bf94e4b8-9309-4f41-8563-c6914588908e action=join channel='{"type":"app"}' user_id=USR-e2969996-3082-4491-ac2d-e1e2c394ed8e system:error:invalid-token: You did not provide a valid token. Please provide a valid token.