Bit Capital

The Bit Capital Developer Hub

Welcome to the Bit Capital developer hub. You'll find comprehensive guides and documentation to help you start working with the platform as quickly as possible, as well as support if you get stuck. Let's jump right in!


Phone Verification

After a successful sign up, the first check needed is to verify a mobile phone number. This is mostly for compliance and to ensure the consumer will be able to use security features, such as Two Factor and Account Recovery.

Start by sending the verification code to the mobile phone using SMS:

const userId = "e6169f9b-6a8d-4f30-9778-1b74d457616e";
const phoneId = "ccb3f57b-b903-4a77-a7a5-11303e1e0c16";

// Sends SMS with a verification code
await bitcapital.phones().sendVerificationToken(userId, phoneId);
curl --location --request POST '' \
--header 'Authorization: Bearer 0000000000000000000000000000000000000000'\
--header 'Content-Type: application/json'

The response of the request will include the time this code expires, as well as a cool down period in which you won't be able to send another code to the same number.

The token should be verified exactly as it was sent, an uppercase char, a hyphen followed by the 6 digit numeric code. In your UI, when the user input the code it received, you can verify the phone using the method below.

const token = "A-123456";

// Send the verification token to activate phone in the platform
await bitcapital.phones().verify(userId, phoneId, token);
curl --location --request POST '' \
--header 'Authorization: Bearer 0000000000000000000000000000000000000000'\
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "4670"

In case of time expiration, you may request a new code repeating the same steps shown above.

Updated about a year ago

Phone Verification

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.