Operator API

URnetwork API: Authentication

Version 1.0.0 · 247 operations across 14 groups.OpenAPI 规范 ↗

URnetwork 完整实现了 UR 协议运营方规范。 UR 协议 ↗

Authentication

28 operations

POST/auth/login

PublicauthLogin

Start a login for a user authority. The user authority may be:

  • email
  • phone number
  • Apple JWT
  • Google JWT
  • a wallet (wallet_auth): a Solana or Bittensor signature over the single-use challenge from /auth/wallet-challenge. A bound wallet returns network.by_jwt; an unbound wallet echoes wallet_auth and the client continues to /auth/network-create with a fresh challenge.
  • a seedphrase

A well-formed wallet signature that does not verify for wallet_address over the challenge (in practice the wallet signed with another account than the address entered) is refused with error.code signature_mismatch when the request sets result_errors, as a 200. Without it, that refusal is a 401 with a plain text body. Every other wallet refusal keeps its HTTP status.

show schema
AuthLoginArgs
user_auth
string

email or phone number

auth_jwt
string
auth_jwt_type
string
enum: apple, google, microsoft
wallet_auth
WalletAuthArgs
seedphrase
string

The recovery seedphrase, for a seedphrase login.

result_errors
boolean

Report a refusal that has a code (signature_mismatch) in the result error with a 200, instead of a 401. New clients set this.

time_zone
string

Optional. The device's or browser's IANA time zone (e.g. America/Chicago). With locales, the campaign emails are placed in the reader's day and written in their language; the server keeps only the network's latest values, never with the request. A zone of UTC is ignored.

locales
array<string>

Optional. The device's or browser's languages, most preferred first, as BCP 47 tags (iOS and macOS Locale.preferredLanguages, Android's LocaleList, a browser's navigator.languages). Leave out a language the device cannot name rather than sending a default such as "en". Same rules as time_zone.

array
string
1 status · show schema
200
AuthLoginResult
user_name
string
user_auth
string

email or phone number

auth_allowed
array<string>

The sign-in methods on file for this user authority

array
string
enum: password, email, phone, apple, google, microsoft, solana, bittensor, seedphrase
error
object
suggested_user_auth
string
enum: password, apple, google, microsoft
code
string

A stable code for a refusal that has one, so a client can pick a localized message. Only with result_errors. signature_mismatch: the wallet signature is well formed but does not verify for wallet_address over the challenge. In practice the wallet signed with another account than the address entered (an sr25519 signature cannot be recovered to the key that made it, so the server cannot name that account), or signed other text. Sign the issued challenge with the entered address. The challenge is not used up. Absent for every other refusal; clients fall back to message for an absent or unknown code.

message
string
network
object
by_jwt
string
wallet_auth
WalletAuthArgs

POST/auth/wallet-challenge

PublicauthWalletChallenge

Issue a single-use wallet sign-in challenge. The wallet signs the returned message_template byte for byte; the signature is then submitted as wallet_auth to /auth/login, /auth/network-create or /auth/add-auth, each of which consumes one challenge. The message is exactly three LF-separated lines: Sign in to URnetwork, Challenge: <challenge> and Timestamp: <unix seconds>; the server rejects any other text (400 invalid message format), a challenge that is unknown, expired (5 minutes), already used, issued for another blockchain or address, or whose timestamp differs from the issued one. Bittensor (TAO) wallets sign with sr25519 in the substrate context; both the raw text and the polkadot-js <Bytes>…</Bytes>-wrapped form of the signature verify, and the unwrapped text is what the client submits. Rate limited per client address. See server/BITTENSOR-LOGIN.md.

show schema
AuthWalletChallengeArgs
blockchain
string

solana (default) or tao/bittensor; case-insensitive

enum: solana, tao, bittensor
wallet_address
string

Optional. Solana base58 public key or Bittensor ss58 address; when given, the challenge is bound to it.

1 status · show schema
200
AuthWalletChallengeResult
challenge
string

32 random bytes, base64url; embedded in message_template

timestamp
integer

unix seconds the challenge was issued; embedded in message_template

expires_in
integer

seconds until the challenge expires (300)

message_template
string

The exact text to sign: Sign in to URnetwork Challenge: <challenge> Timestamp: <timestamp>

error
object
message
string

POST/auth/wallet-nonce

PublicauthWalletNonce

Issue a fresh single-use, short-lived (5 minute) nonce for wallet login. The client embeds the returned nonce in the message it signs and echoes it back as wallet_auth.wallet_nonce; the server validates and consumes it in the same transaction as the login, so a captured (message, signature) pair cannot be replayed. The nonce is optional during the client rollout and enforced whenever it is present.

This is the older, narrower anti-replay token. /auth/wallet-challenge supersedes it: that one returns the exact message text to sign and binds the challenge to a blockchain and an address.

1 status · show schema
200
AuthWalletNonceResult
nonce
string

Single-use, expires in 5 minutes. Embed it in the signed message and echo it as wallet_auth.wallet_nonce.

POST/auth/login-with-password

PublicauthLoginWithPassword

Password login for email and phone number.

show schema
AuthLoginWithPasswordArgs
user_auth
string

email or phone number

password
string
verify_otp_numeric
boolean
time_zone
string

Optional. The device's or browser's IANA time zone (e.g. America/Chicago). With locales, the campaign emails are placed in the reader's day and written in their language; the server keeps only the network's latest values, never with the request. A zone of UTC is ignored.

locales
array<string>

Optional. The device's or browser's languages, most preferred first, as BCP 47 tags (iOS and macOS Locale.preferredLanguages, Android's LocaleList, a browser's navigator.languages). Leave out a language the device cannot name rather than sending a default such as "en". Same rules as time_zone.

array
string
1 status · show schema
200
AuthLoginWithPasswordResult
verification_required
object
user_auth
string

email or phone number

send_error
AuthVerifySendError

Present when the verification code was not sent. Clients must not say a code was sent, and show this instead.

network
object
by_jwt
string
name
string
error
object
message
string

POST/auth/verify

Bearer authauthVerify

Verify ownership of email or phone number.

The verification and the session it returns commit together: a refused session (409 session_limit_reached, the network's session cap) leaves the code unused and the email or phone unverified.

No authentication is required. A signed-in caller verifying an email or phone of its own network (adding a sign-in method) sends its network token as the bearer: the verify then renews the caller's own session and network.by_jwt is a token of that session, so no new sign-in is listed and the session cap is not reached. Without a bearer, or with one that is not a live network token of the verified network and user (another network's, an ended session's, a client token, an API key), the verify starts a new session, as a sign-in does; such a bearer is never refused here.

show schema
AuthVerifyArgs
user_auth
string

email or phone number

verify_code
string
time_zone
string

Optional. The device's or browser's IANA time zone (e.g. America/Chicago). With locales, the campaign emails are placed in the reader's day and written in their language; the server keeps only the network's latest values, never with the request. A zone of UTC is ignored.

locales
array<string>

Optional. The device's or browser's languages, most preferred first, as BCP 47 tags (iOS and macOS Locale.preferredLanguages, Android's LocaleList, a browser's navigator.languages). Leave out a language the device cannot name rather than sending a default such as "en". Same rules as time_zone.

array
string
1 status · show schema
200
AuthVerifyResult
network
object
by_jwt
string
error
object
message
string

GET/auth/refresh

Bearer authauthRefreshToken

Refresh the client JWT (by_jwt) for the caller's client. Requires a client JWT (from /network/auth-client). A network JWT (the network's sign-in token, with no client) is refused here with a result error; renew it with POST /auth/network-refresh.

The refreshed JWT keeps the create time of the JWT it refreshes, so a password reset that expires one expires the other.

1 status · show schema
200
RefreshTokenResult
by_jwt
string

The refreshed client JWT.

error
object
message
string

POST/auth/network-refresh

Bearer authauthNetworkRefresh

Renew the network's sign-in token: a network JWT, with no client. Every JWT lives 30 days. The result is a new network JWT for the same network and user, with a new expiration, the network's current name and its current Pro state. It keeps the create time of the JWT it renews, so a password reset that expires one expires the other.

Renew a network JWT before it expires. While the server still accepts expired JWTs, an expired network JWT renews too; once it does not, the user signs in again.

A client JWT (by_client_jwt, from POST /network/auth-client) is refused with 403, because a client JWT never obtains a network JWT; refresh a client JWT with GET /auth/refresh. An API key does not expire, and is refused with a result error.

3 statuses · show schema
200
NetworkRefreshTokenResult
by_jwt
string

The renewed network JWT.

error
object
message
string
401
No body
403
No body

POST/auth/verify-send

PublicauthVerifySend

Send verification code to email or phone number.

With result_errors set, a code that was not sent is reported in the result error (verify_send_failed, or verify_rate_limited with retry_after_seconds). Without it, a rate limit is a 429 and a failed send is a 502, both with a plain text body. Clients must not report a code as sent unless the response is a 200 without error.

show schema
AuthVerifySendArgs
user_auth
string

email or phone number

use_numeric
boolean

optionally create a numeric 6 digit code instead of the default 8 digit

result_errors
boolean

Report a code that was not sent in the result error with a 200, instead of a 429 or 502. New clients set this.

4 statuses · show schema
200
AuthVerifySendResult
user_auth
string

email or phone number

error
AuthVerifySendError

Present when the code was not sent (only with result_errors).

400
No body
429
No body
502
No body

POST/auth/password-reset

PublicauthPasswordReset

Send password reset code to email or phone number.

With result_errors set, a reset code that was not sent is reported in the result error (verify_send_failed, or verify_rate_limited with retry_after_seconds). Without it, a rate limit is a 429 and a failed send is a 502, both with a plain text body. Clients must not report a reset code as sent unless the response is a 200 without error.

show schema
AuthPasswordResetArgs
user_auth
string

email or phone number

result_errors
boolean

Report a reset code that was not sent in the result error with a 200, instead of a 429 or 502. New clients set this.

4 statuses · show schema
200
AuthPasswordResetResult
user_auth
string

email or phone number

error
AuthVerifySendError

Present when the reset code was not sent (only with result_errors).

400
No body
429
No body
502
No body

POST/auth/password-set

PublicauthPasswordSet

Change password.

show schema
AuthPasswordSetArgs
reset_code
string
password
string
2 statuses · show schema
200
AuthPasswordSetResult
empty object
400
No body

POST/auth/network-check

PublicauthNetworkCheck

Check if the network name is available. The name is normalized before it is checked: trimmed, lower-cased, and spaces replaced with dashes. The normalized name must satisfy:

  • at least 5 characters
  • at most 50 characters
  • only lowercase letters, digits and dashes and must not be within one edit of an existing network name.
show schema
NetworkCheckArgs
network_name
string
1 status · show schema
200
NetworkCheckResult
available
boolean

POST/auth/network-create

PublicauthNetworkCreate

Create a new network. A user authority can be associated with at most one network.

A well-formed wallet signature that does not verify for wallet_address over the challenge (in practice the wallet signed with another account than the address entered) is refused with a 401. When the request sets result_errors, the 401's body is the JSON result with error.code signature_mismatch; without it, the body is the plain text message. A 2xx is always a created network or its pending state, never a refusal. Every other refusal keeps its HTTP status and plain text body.

show schema
NetworkCreateArgs
user_name
string
user_auth
string

email or phone number

auth_jwt
string
auth_jwt_type
string
enum: apple, google, microsoft
password
string
network_name
string
terms
boolean

user consent to accept terms of service

verify_use_numeric
boolean
wallet_auth
WalletAuthArgs
referral_code
string

Optional referral code of the network that referred this new network.

balance_code
string

Optional balance code to add transfer balance to the new network.

product_updates
boolean

The sign-up form's "Periodic product updates" line. Absent = true (the line ships ticked). false turns the product-updates preference off from the first moment: no onboarding campaign mail is ever sent. Honored on every create path, including sign-ups that complete through /auth/verify. The server records a signup.optout_changed event with the value, and, as the consent evidence the email campaigns read, whether the request carried the field at all. Send it exactly when the form shows the line, ticked or not: a request with the field is recorded as the user's answer to the switch, one without it as a default the user never saw.

result_errors
boolean

Answer a refusal that has a code (signature_mismatch) with the result as the JSON body of its 401, instead of the plain text message. New clients set this.

time_zone
string

Optional. The device's or browser's IANA time zone (e.g. America/Chicago). With locales, the campaign emails are placed in the reader's day and written in their language; the server keeps only the network's latest values, never with the request. A zone of UTC is ignored.

locales
array<string>

Optional. The device's or browser's languages, most preferred first, as BCP 47 tags (iOS and macOS Locale.preferredLanguages, Android's LocaleList, a browser's navigator.languages). Leave out a language the device cannot name rather than sending a default such as "en". Same rules as time_zone.

array
string
acquisition
NetworkAcquisition
NetworkAcquisition
channel
string

Where the client read the fields. Any other value is dropped.

enum: web, play
utm_source
string
utm_medium
string
utm_campaign
string
utm_content
string
utm_term
string
referrer_host
string

The host of the page that linked to the first ur.io page, without its scheme, port, path or query, and without a leading www.: a bare host, or the field is dropped. Also dropped when it is an IP address, has no public top-level domain (localhost, .local, .internal, .lan, .home, .corp, ...), is ur.io's own, or is longer than 128 characters.

landing_path
string

The path of the first ur.io page, lowercase, without its query or fragment: at most 4 segments of [a-z0-9._~-] and 128 characters. The path ends before the first segment outside that set, and a segment that looks like an id or token becomes -.

3 statuses · show schema

POST/auth/network-delete

Bearer authauthNetworkDelete

Delete network

A caller that is not the network's admin is also refused with a 403, with the plain text body Could not remove network.

A deletion that cannot go ahead yet answers 200 with error.message and removes nothing; retry once its cause is gone. The causes: an App Store subscription that may still renew (only its owner can cancel it, in the App Store), a Stripe or Google Play subscription that could not be cancelled, a store renewal credited while the deletion ran, and a Pay with Gamma charge in flight: a spend from the network's gamma deposit in a spend batch that can still land, or spent and not yet credited. Gamma cannot be refunded, so the deletion waits for that charge to be credited, minutes at most. Retried then, it deletes the network, turns its automatic gamma renewal, top-up and seat upgrade off, and voids its open gamma purchases; the deposit is on chain and keeps its gamma.

3 statuses · show schema
200
NetworkDeleteResult
error
object
message
string
403
No body
409
No body

POST/auth/code-create

Bearer authauthCodeCreate

Create a limited use code (auth code) to share authentication with connected apps and tools. The code is tied to the caller session, and will be expired with any of the caller's sessions. This is a subset of an OAuth flow. For the full OAuth 2.1 / OpenID Connect flow see the /oauth routes.

show schema
AuthCodeCreateArgs
duration_minutes
number
uses
integer
roles
array<string>

Optional. Identity roles carried by logins minted from this code. Only a network session may set these. The values have no meaning to the network.

array
string
principal
string

Optional. Identity principal carried by logins minted from this code. Only a network session may set this.

2 statuses · show schema
200
AuthCodeCreateResult
auth_code
string
duration_minutes
number
uses
integer
error
object
auth_code_limit_exceeded
boolean
message
string
403
No body

GET/auth/apple/callback

PublicauthAppleCallbackGet
state(query)
string
required
id_token(query)
string
code(query)
string
user(query)
string
error(query)
string
2 statuses · show schema
302
No body
400
No body

POST/auth/apple/callback

PublicauthAppleCallback

Apple has no SDK for android, windows or linux, so those apps open Apple's authorize page in the system browser (a Custom Tab on android) with client_id = the Apple Services ID, redirect_uri = this endpoint, response_type=code id_token, response_mode=form_post, scope=name email, and a fresh state and nonce per attempt. Apple posts the result here as a form, and this endpoint answers 302 to the app's own scheme so the browser hands control back to the app:

Text
<scheme>://oauth/apple?state=…&id_token=…&code=…&user=…
<scheme>://oauth/apple?state=…&error=…

user is the JSON name/email Apple sends with the first authorization only. Nothing is stored or verified here: the app checks that state is the attempt it started and that the identity token's nonce claim is the one it minted, then signs in with the token through POST /auth/login (auth_jwt_type: apple), which verifies the signature and the audience.

state is opaque except for one optional claim: when it is the base64url encoding of a JSON object with a platform key, that key picks the scheme (android → ur://, windows and linux → urnetwork://); without it the android scheme is used. GET with the same parameters as a query behaves the same way (manual testing).

show schema
state
string

The attempt's state, echoed by Apple untouched.

code
string

Apple's authorization code (unused by the apps, passed through).

id_token
string

Apple's identity token (a JWT carrying the attempt's nonce).

user
string

JSON with the user's name and email, first authorization only.

error
string

Apple's error, e.g. user_cancelled_authorize.

2 statuses · show schema
302
No body
400
No body

GET/auth/google/callback

PublicauthGoogleCallback

Windows and Linux have no native Google sign-in, so those apps open Google's authorize page in the system browser with client_id = the ur.io web sign-in client, redirect_uri = this endpoint, response_type=code, scope=openid email profile, prompt=select_account, and a fresh state and nonce per attempt (android signs in with play services and ur.io in the page; neither uses this). Google redirects the browser here with the authorization code; this endpoint exchanges it at Google's token endpoint with the web client's secret and answers 302 to the app's own scheme so the browser hands control back to the app:

Text
<scheme>://oauth/google?state=…&id_token=…
<scheme>://oauth/google?state=…&error=…

Nothing is stored. The app checks that state is the attempt it started and that the identity token's nonce claim is the one it minted, then signs in with the token through POST /auth/login (auth_jwt_type: google), which verifies the signature and the audience.

state is opaque except for the optional platform claim shared with the Apple callback: base64url JSON with a platform key picks the scheme (android → ur://, windows and linux → urnetwork://); without it the android scheme is used. Google's own error (e.g. access_denied) is passed through; a failed exchange or a missing client configuration comes back as error too (not_configured when the server has no Google sign-in client configured).

state(query)
string

The attempt's state, echoed by Google untouched.

required
code(query)
string

Google's authorization code, exchanged here for the identity token.

error(query)
string

Google's error, e.g. access_denied.

3 statuses · show schema
302
No body
400
No body
405
No body

POST/auth/code-login

PublicauthCodeLogin

Authenticate with an auth code. Redemption creates an independent sign-in. An unredeemed code is invalidated when its creator's session is revoked; a completed redemption is governed by its own session thereafter. Reuse the same request_id after a lost response. Reusing it with another code returns a generic request_id_conflict without exposing the prior redemption. This is a subset of an OAuth flow.

show schema
AuthCodeLoginArgs
auth_code
string
request_id
string,null (uuid)

Stable redemption identity reused after a lost response; redemption creates an independent sign-in.

2 statuses · show schema
200
AuthCodeLoginResult
by_jwt
string
error
object
message
string
409
No body

POST/auth/add-auth

Bearer authauthAddAuth

Add an authentication method (email/phone + password, SSO, or wallet) to the calling user. A wallet (wallet_auth, Solana or Bittensor) must sign the single-use challenge from /auth/wallet-challenge, the same proof as wallet login; one wallet address binds to one user. Subject to the account action rate limit.

Refusals come back in the result error as a 200. A well-formed wallet signature that does not verify for wallet_address over the challenge (in practice the wallet signed with another account than the address entered) has error.code signature_mismatch.

show schema
AddAuthArgs
user_auth
string

email or phone number

auth_jwt
string
auth_jwt_type
string
enum: apple, google, microsoft
password
string
wallet_auth
WalletAuthArgs
2 statuses · show schema
200
AddAuthResult
error
object
code
string

A stable code for a refusal that has one, so a client can pick a localized message. signature_mismatch: the wallet signature is well formed but does not verify for wallet_address over the challenge. In practice the wallet signed with another account than the address entered, or signed other text. Sign the issued challenge with the entered address. The challenge is not used up. Absent from older servers and for every other refusal; clients fall back to message for an absent or unknown code.

message
string
403
No body

POST/auth/remove-auth

Bearer authauthRemoveAuth

Remove an authentication method from the calling user. The last remaining method cannot be removed.

show schema
RemoveAuthArgs
auth_type
string

The sign-in method to remove; the last remaining method cannot be removed

enum: email, phone, apple, google, microsoft, solana, bittensor, seedphrase
2 statuses · show schema
200
RemoveAuthResult
error
object
message
string
403
No body

GET/auth/email-change

Bearer authauthEmailChangeStatus

The email change the caller's account has waiting for its two codes, or pending: false. Network credential only: the network's sign-in token. A client token is refused with 403, and an API key is answered owner_only.

2 statuses · show schema
200
AuthEmailChangeStatusResult
pending
boolean

Whether an email change is waiting for its codes.

current_email
string

The current email, masked.

new_email
string
current_confirmed
boolean
new_confirmed
boolean
expires_at_millis
integer (int64)
error
AuthEmailChangeError
403
No body

POST/auth/email-change

Bearer authauthEmailChange

Starts changing the account's email sign-in to new_email. A code is sent to the current email and another to the new one; the change happens only when both are confirmed through POST /auth/email-change/confirm before expires_at_millis. The password stays the same. The account's sign-in email addresses get a security notice when the change is requested and again when it completes, and completing it signs out the account's other sessions.

A new request replaces a waiting one. Requests are limited per account and per address. Network credential only: the network's sign-in token. A client token is refused with 403, and an API key is answered owner_only. Refusals come back in the result error as a 200 (AuthEmailChangeError).

show schema
AuthEmailChangeArgs
new_email
string

The email address to change the account's email sign-in to.

2 statuses · show schema
200
AuthEmailChangeResult
current_email
string

The current email, masked (j…@example.com), which was sent a code.

new_email
string

The new email, normalized, which was sent a code.

expires_at_millis
integer (int64)

When the request ends unless both codes were confirmed, unix milliseconds.

error
AuthEmailChangeError
403
No body

POST/auth/email-change/confirm

Bearer authauthEmailChangeConfirm

Confirms the waiting email change with the code sent to the current email (current_code), the code sent to the new email (new_code), or both. Each right code confirms its address; when both addresses are confirmed the change completes (complete: true): the email sign-in and the account email become the new address, and the account's other sessions are signed out (other_sessions_signed_out; false when the current sign-in has no session to keep, in which case Settings > Sessions signs them out). A wrong code counts against the request; too many end it (too_many_tries). Network credential only, as for POST /auth/email-change.

show schema
AuthEmailChangeConfirmArgs
current_code
string

The code sent to the current email.

new_code
string

The code sent to the new email.

2 statuses · show schema
200
AuthEmailChangeConfirmResult
current_confirmed
boolean
new_confirmed
boolean
complete
boolean

Both addresses are confirmed and the account's email sign-in is now email.

email
string

The account's email sign-in once complete.

other_sessions_signed_out
boolean

The account's other sessions were signed out when the change completed. False when the current sign-in has no session to keep; Settings > Sessions signs them out then.

error
AuthEmailChangeError
403
No body

POST/auth/email-change/cancel

Bearer authauthEmailChangeCancel

Ends the waiting email change, if any; its codes stop working. Network credential only, as for POST /auth/email-change.

show schema
AuthEmailChangeCancelArgs
empty object
2 statuses · show schema
200
AuthEmailChangeCancelResult
error
AuthEmailChangeError
403
No body

GET/auth/microsoft/start

PublicauthMicrosoftStart

Every app (and ur.io) signs in with Microsoft through the browser: it opens this endpoint with a fresh state and nonce per attempt, and the endpoint answers 302 to Microsoft's authorize page (login.microsoftonline.com/common/oauth2/v2.0/authorize) with the server's Microsoft client, response_type=code, scope=openid email profile, prompt=select_account and redirect_uri = GET /auth/microsoft/callback. The client id lives only on the server, so no app carries it.

state is opaque except for its optional platform claim, as for the Apple and Google callbacks: base64url JSON with a platform key picks where the result returns (android → ur://, ios, macos, windows and linux → urnetwork://, web → ur.io's /auth/microsoft/callback page, the result in the fragment); without it the android scheme is used. Without a configured Microsoft client, or for a malformed state or nonce, the answer goes straight back to the app with error (not_configured, invalid_request).

state(query)
string

The attempt's state, at most 1024 characters of the base64url alphabet, ., - and _.

required
nonce(query)
string

The attempt's nonce, 16 to 256 characters of the same alphabet. The identity token carries it as its nonce claim.

required
1 status · show schema
302
No body

GET/auth/microsoft/callback

PublicauthMicrosoftCallback

Microsoft redirects the browser here with the authorization code of an attempt GET /auth/microsoft/start began. This endpoint exchanges it at Microsoft's token endpoint with the server's client secret and answers 302 to where the attempt's platform returns:

Text
<scheme>://oauth/microsoft?state=…&id_token=…
<scheme>://oauth/microsoft?state=…&error=…
https://ur.io/auth/microsoft/callback#state=…&id_token=…

Nothing is stored. The app checks that state is the attempt it started and that the identity token's nonce claim is the one it minted, then signs in with the token through POST /auth/login (auth_jwt_type: microsoft) or adds it with POST /auth/add-auth. The server accepts a Microsoft identity token only for its own client id and only with an email Microsoft verified: a personal Microsoft account's email, or a work or school account's email whose domain its organization verified (the xms_edov claim).

state(query)
string

The attempt's state, echoed by Microsoft untouched.

required
code(query)
string

Microsoft's authorization code, exchanged here for the identity token.

error(query)
string

Microsoft's error, e.g. access_denied.

error_description(query)
string

Microsoft's description of its error.

3 statuses · show schema
302
No body
400
No body
405
No body

POST/auth/generate-seedphrase

Bearer authauthGenerateSeedphrase

Generate a recovery seedphrase for the calling user. Fails if a seedphrase auth already exists; see /auth/regenerate-seedphrase.

2 statuses · show schema
200
GenerateSeedphraseResult
seedphrase
string
error
object
message
string
403
No body

POST/auth/regenerate-seedphrase

Bearer authauthRegenerateSeedphrase

Replace the calling user's recovery seedphrase with a new one, invalidating the previous seedphrase.

2 statuses · show schema
200
RegenerateSeedphraseResult
seedphrase
string
error
object
message
string
403
No body

Shared schemas

WalletAuthArgs

wallet_address
string

Solana base58 public key, or Bittensor ss58 address (prefix 42, checksum verified)

wallet_message
string

The message_template issued by /auth/wallet-challenge, unmodified (no <Bytes> wrapper, LF line endings)

wallet_signature
string

Solana: base64 ed25519 signature over the message. Bittensor: hex of the 64-byte sr25519 signature (with or without 0x) made in the substrate signing context, over the raw or <Bytes>-wrapped message

blockchain
string

solana (default) or tao/bittensor; case-insensitive

enum: solana, tao, bittensor
wallet_nonce
string

The single-use nonce from /auth/wallet-nonce, embedded in wallet_message and echoed here. Optional during the client rollout; enforced whenever it is present. The newer /auth/wallet-challenge flow supersedes it.

AuthVerifySendError

code
string

verify_send_failed: the email or SMS send failed. verify_rate_limited: too many attempts; see retry_after_seconds. Clients treat an unknown code as a code that was not sent.

message
string
retry_after_seconds
integer

For verify_rate_limited, seconds until a new code can be requested.

NetworkCreateResult

network
object
by_jwt
string
network_id
string

uuid

network_name
string
is_pro
boolean
user_auth
string

email or phone number

seedphrase
string

The generated recovery seedphrase, returned once on the seedphrase sign-up path. It is never retrievable again.

is_pro
boolean
verification_required
object
user_auth
string

email or phone number

send_error
AuthVerifySendError

Present when the verification code was not sent. Clients must not say a code was sent, and show this instead.

error
object
code
string

A stable code for a refusal that has one, so a client can pick a localized message. Only with result_errors, in the body of the refusal's 401. signature_mismatch: the wallet signature is well formed but does not verify for wallet_address over the challenge. In practice the wallet signed with another account than the address entered, or signed other text. Sign the issued challenge with the entered address. The challenge is not used up. Clients fall back to message for an absent or unknown code.

message
string

AuthEmailChangeError

code
string

owner_only: only the network's own sign-in can change its email (not an API key). no_email: the account has no email sign-in; add one instead. email_unverified: the current email sign-in is not verified yet. invalid_email: new_email is not an email address. same_email: new_email is the current email. email_in_use: another account signs in with new_email. rate_limited: too many requests or codes; see retry_after_seconds. send_failed: a code could not be sent; ask again. no_change: no email change is waiting (it expired, was cancelled, completed, or never started). code_invalid: a code is wrong; the request is still waiting. too_many_tries: too many wrong codes; the request ended. Clients show message for an unknown code.

message
string
retry_after_seconds
integer

For rate_limited, seconds until it can be asked again.