Closed tchan408 closed 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?
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.
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
nexmo-cli@0.4.8-beta-1 updated 2 packages in 0.775s
nexmo -V 0.4.8-beta-1
nexmo ml CON-7773b084-859a-4a74-a256-ff519b5a44ae No members
curl -X "GET" "https://api.nexmo.com/beta/conversations/CON-7773b084-859a-4a74-a256-ff519b5a44ae/members" \ -H 'Authorization: Bearer '$JWT \ -H 'Content-Type: application/json' [ { "user_id": "USR-40be0f68-1fde-4de9-a821-da2f52890079", "name": "tony", "user_name": "tony", "state": "JOINED" } ,
{ "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: