Public
Documentation Settings

CoinRabbit

Public API

auth

Log in to get x-user-token

  • If you need users to verify themselves:
    • Send verification code to user
    • Verify user's verification code
    • Get verification_token to proceed with Log in
  • If you don't then Log in using /auth/partners endpoint

To add 2fa simply:

  • Create 2fa secret to be used in Google Authenticator
  • Verify adding 2fa by providing code from Google Authenticator and verification_token after verifying user code at /utils/verification-code/verify

2FA

POSTActive 2fa

https://api.coinrabbit.io/v2/auth/2fa/activate

Parameter verification_token is a token received after successfully verifying code at /utils/verification-code/verify for message types TFA_ACTIVATION

HEADERS
x-api-key

{{apiKey}}

x-user-token

{{xUserToken}}

Example Request
curl
curl --location 'https://api.coinrabbit.io/v2/auth/2fa/activate' \
--header 'x-api-key: {{apiKey}}' \
--header 'x-user-token: {{xUserToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "verification_token": "verification_token",
    "code_2fa": "123456",
    "secret_2fa": "asdfq34523refasdfsdfq234"
}'
Example Response
json
{
  "result": true
}
No response headers
This request doesn't return any response headers

POSTDeactivate 2fa

Parameter verification_token is a token received after successfully verifying code at /utils/verification-code/verify for message types TFA_DEACTIVATION

HEADERS
x-api-key

{{apiKey}}

x-user-token

{{xUserToken}}

Example Request
curl
curl --location '' \
--header 'x-api-key: {{apiKey}}' \
--header 'x-user-token: {{xUserToken}}' \
--header 'Content-Type: application/json' \
--data '{
    "verification_token": "verification_token",
    "code_2fa": "123456"
}'
Example Response
{
  "result": true
}
No response headers
This request doesn't return any response headers

POSTCreate 2fa secret

https://api.coinrabbit.io/v2/auth/2fa/activate
HEADERS
x-user-token

{{xUserToken}}

Example Request
curl
curl --location --request POST 'https://api.coinrabbit.io/v2/auth/2fa/activate' \
--header 'x-user-token: {{xUserToken}}' \
--header 'Content-Type: application/json'
Example Response
json
{
  "result": true,
  "response": {
    "secret": "asdfq34523refasdfsdfq234"
  }
}
No response headers
This request doesn't return any response headers