I'm building a react native app and want to use Stych for OTP auth. To do that I need to use their API and send a cURL request which looks something like:
curl --request POST \
--url https://test.stytch.com/v1/otps/sms/send \
-u 'MY-SECRET-YO' \
-H 'Content-Type: application/json' \
-d '{
"phone_number": "+100000000"
}'
See docs here.
How do I convert this into a valid request in my app?
Thanks!