Authentication
Public
Generates a token for a new named session. This method can be used only with session scoped tokens.
Rules:
- The refresh token must have session scope; a connection scope refresh token is rejected with -32602 on refresh_token.
- session_name longer than 64 bytes is truncated (not rejected). The truncated name must differ from the current session name, otherwise the call fails with -32602 on session_name.
- The forked session keeps the scope of the original token with only the session name replaced, and receives a fresh access token and refresh token.
- Unlike public/auth and public/exchange_token, the forked access token is not installed on the current WebSocket connection: the connection keeps its current authentication until you authenticate it with the new token.
- An invalid, expired or already-replaced refresh token returns -32602 on refresh_token; session_not_found means the session of the token no longer exists.
📖 More Details: Fork and Exchange Tokens
get/public/fork_token
Request
- Base URLhttps://test.deribit.com/api/v2
- URLhttps://test.deribit.com/api/v2/public/fork_token
- Authnone declared
Query parameters
refresh_tokenstring required
Example:1568800656974.1CWcuzUS.MGy49NK4hpTwvR1OYWfpqMEkH4T4oDg4tNIcrM7KdeyxXRcSFqiGzA_D4Cn7mqWocHmlS89FFmUYcmaN2H7lNKKTnhRg5EtrzsFCCiuyN0Wv9y-LbGLV3-Ojv_kbD50FoScQ8BDXS5b_w6Ir1MqEdQ3qFZ3MLcvlPiIgG2BqyJX3ybYnVpIlrVrrdYD1-lkjLcjxOBNJvvUKNUAzkQ
Refresh token
session_namestring required
Example:forked_session_name
Name of the new session (truncated to 64 bytes). Must differ from the current session name.
Response
Success response
Example response
{
"result": {
"access_token": "843SehgeX5n6XxEU4XbABx4Cny5Akai5iHiJePTsvUw7",
"expires_in": 900,
"refresh_token": "6faf8L36JdaSqsjCEEiwqifPpj6JB18RWwiWHrsGTZ91"
}
}Changes
No recorded changes to this operation across all 11 revisions of this API.