Add twilio testing instructions
Wrote these out for front/!698 but they might be useful for others.
Testing twilio
To test the phone verification step in the token onboarding process locally, you need to make some backend changes.
- in
settings.php
,
$CONFIG->set('twilio', [
'account_sid' => '',//get this from Mark
'auth_token' => '',//get this from Mark
'from' => '+15005550006' // use this exact number
]);
- in
Core/Rewards/Join.php
, go to theverify()
function- directly after this line (around 116):
$code = $this->twofactor->getCode($secret);
, adderror_log($code)
- comment this line (around 120):
throw new \Exception('voip phones not allowed');
- now when you enter almost any phone number in token onboarding, the corresponding verification code will appear in your php logs. Use it to complete the phone verification step. Note: the handful of phone numbers that won't work are the magic 'To' numbers listed in Twilio's test credential docs.
- directly after this line (around 116):
Edited by (Mark) Ryan Sallee