Choose an environment

.md

Pick which account to sign in to when a password was right for more than one.

POST/v1/auth/token/workspace

The step after signing in without an environment, when the password was right for accounts in more than one. Answers exactly as signing in does: a token, or a two-factor challenge for the chosen account.

Request

curl https://api.proppertrading.com/v1/auth/token/workspace \
  -H "Content-Type: application/json" \
  -d '{
    "choice": "5d0c3f2e9a7b4c1d8e6f0a2b4c6d8e1f3a5b7c9d0e2f4a6b8c1d3e5f7a9b0c2d",
    "workspace": "acmefunded"
  }'
FieldTypeDescription
choicestringFrom the sign-in response. Required
workspacestringThe id of one of the environments offered. Required

Who is signing in, which scopes and which device all come from the choice. This request only says where.

Response

The same two responses as signing in: signed_in with a token, or two_factor_required with a challenge for the second step.

The choice is used once

Picking one spends it, whatever happens next. A wrong code at the second step goes back to the password, as it always has. Picking an environment that was not offered does not spend it, so the same choice can be sent again with one that was. It expires on its own after five minutes.

Errors

StatusCodeMeaning
400workspace_not_foundNot one of the environments that were offered
401expired_workspace_choiceExpired or already used. Start again from the password
401account_deactivatedThe chosen account has been switched off
403admin_access_requiredSigning in to the Propper app with an account that does not help run the environment
403two_factor_setup_requiredThe firm requires two-factor and this account has none
403block_anonymizerThe firm blocks VPN, proxy and Tor connections
403block_countryThe firm blocks connections from this country
422validation_failedA field is missing or malformed
429rate_limit_exceededShares the limit of the two-factor step
503tenant_in_maintenanceThe firm is closed for maintenance