Open ashsharma1 opened 11 months ago
Looks like there were some items missing in the .env file. After adding those, I get a fresh new error:
voice/getAccessToken/rejected {
"reason": "TOKEN_RESPONSE_NOT_OK",
"statusCode": 404,
"error": {
"name": "Error",
"message": "User info not found."
}
}
Am I supposed to create a user in Twilio?
The Auth0 logs show a successful login.
Hi @ashsharma1 , did you fill out the .env
for the server? https://github.com/twilio/twilio-voice-react-native-app/blob/main/server/example.env
It seems like you have correctly configured Auth0, but the app is failing at the Twilio Access Token
step. The server and app need to be ran in conjunction.
We have an additional README in the server for setup: https://github.com/twilio/twilio-voice-react-native-app/tree/main/server#readme
Hi @kpchoy Thanks for the prompt response. I have fixed the issues with the .env files and now I am past the stage of getting the user info.
Now I get a fresh set of errors in the log.
registration/register/rejected {
"reason": "NATIVE_MODULE_REJECTED",
"error": {
"name": "Error",
"message": "Registration Error: 51007, Token authentication is rejected by authentication service",
"code": "EUNSPECIFIED"
}
}
LOG loginAndRegister/rejected {
"reason": "REGISTER_REJECTED"
}
ERROR {"reason": "REGISTER_REJECTED"}
It looks like some of your Twilio env variables are incorrect. Can you double check and make sure those values match the values in Twilio Console.
After creating a brand new twilio account, I still get errors:
LOG accessToken = {"status":"fulfilled","value":"eyJhbGciOiJIUzI1NiIsInR5....BY"}
LOG voiceRegisterResult = {"status":"rejected","reason":{"nativeStackAndroid":[],"userInfo":null,"message":"Registration Error: 31400, Bad Request","code":"EUNSPECIFIED"}}
LOG registration/register/rejected {
"reason": "NATIVE_MODULE_REJECTED",
"error": {
"name": "Error",
"message": "Registration Error: 31400, Bad Request",
"code": "EUNSPECIFIED"
}
}
LOG loginAndRegister/rejected {
"reason": "REGISTER_REJECTED"
}
ERROR {"reason": "REGISTER_REJECTED"}
Looks like when the app tries to register for voice, it receives an error. I have checked the token on JWT.io and it looks fine.
Can you please update the documentation on what all specific things should we do on a twilio side account to make this work.
Thanks.
The example.env
has all the variables that you need.
Here is a link to authToken
and accountSid
: https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them
Here is another to apiKey
and apiKeySecret
https://support.twilio.com/hc/en-us/articles/9318455807771-API-Keys-and-How-to-Change-Them
Do you have any errors in your server?
I am running the server in the repo under /server. I have not changed its code in any way. And its doing the auth with auth0 fine.
Hello @ashsharma1 are you still encountering this issue?
I set up the app and the server. While authenticated via username+pwd with auth0, I got the following response in the Log:
I didn't see setting up any JWKS in the instructions. Is there anything I am missing here?