Retrieve Riffusion API account configuration for user_id
February 17, 2025
Table of contents
https://api.useapi.net/v1/riffusion/accounts/
user_id
The user_id
value should correspond to an account configured previously via a POST accounts request.
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API token
is required, see Setup useapi.net for details.
Responses
-
{ "user_id": "b511d6f4-1e33-45c3-885d-0fa094dd5d70", "maxJobs": 6, "jwt": { "expires_at": 1781234765, "expires_in": 604800, "refresh_token": "…secured…", "access_token": "…secured…", "expires_at_UTC": "2025-04-18T12:50:45.000Z", "token_type": "bearer", "user": { "id": "b511d6f4-1e33-45c3-885d-0fa094dd5d70" } } }
-
{ "error": "Unauthorized", "code": 401 }
-
Configuration not found. To create configuration use POST accounts.
Model
{ // TypeScript, all fields are optional
user_id: string
maxJobs: number
jwt: {
access_token: string
token_type: string
expires_in: number
expires_at: number
refresh_token: string
expires_at_UTC: string
user: {
id: string
}
}
}
Examples
-
curl https://api.useapi.net/v1/riffusion/accounts/<user_id> \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
const token = "API token"; const user_id = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/riffusion/accounts/${user_id}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" user_id = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/riffusion/accounts/{user_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())