Refresh session tokens
POST
/v1/auth/refresh
const url = 'https://api.neuramancer.dev/v1/auth/refresh';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"refreshToken":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.neuramancer.dev/v1/auth/refresh \ --header 'Content-Type: application/json' \ --data '{ "refreshToken": "example" }'Exchanges a valid refresh token for new session tokens via Firebase. No middleware authentication required.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
refreshToken
required
Refresh token obtained from a previous login or refresh
string
Examplegenerated
{ "refreshToken": "example"}Responses
Section titled “Responses”Tokens refreshed successfully
Media typeapplication/json
Standardized success response containing session tokens, following the APIResponse
object
success
required
boolean
data
required
object
customIdToken
required
Custom Firebase ID token for authenticated requests
string
customRefreshToken
required
Refresh token to obtain new session tokens
string
tosAccepted
required
Whether the user has accepted the terms of service
boolean
Example
{ "success": true}Invalid or expired refresh token
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}