I tried my code in laravel php to send otp from firebase by phone number , but I get always MISSING_CLIENT_IDENTIFIER in the response , I already activated the phone authentication service in my firebase app ,
$phone = $request->get('phone');
$apiKey = 'my key';
try {
$client = new Client();
$response =$client>post('https://identitytoolkit.googleapis.com/v1/accounts:sendVerificationCode?key=' . $apiKey, [
'json' => [
'phoneNumber' => "+".$phone
]
]);
$data = json_decode($response->getBody(), true);
the response is
“error”: “Client error: POST https://identitytoolkit.googleapis.com/v1/accounts:sendVerificationCode?key=my key
resulted in a 400 Bad Request
response:n{n “error”: {n “code”: 400,n “message”: “MISSING_CLIENT_IDENTIFIER”,n “errors”: [n {n “message”: ” (truncated…)n”
I want to send the code and verify the code in another api