I'm trying to follow the React hooks documentation, but I keep getting a 404. I've verifed that the accessToken is correct. I'm not really sure what else to try at this point.
Run Details
export function Run() {
const { accessToken } = useTriggerAuthContext()
const { run, error } = useRealtimeRun(
'upload-and-generate-predictions-flow' satisfies UploadAndGeneratePredictionsFlowId,
{ accessToken },
)
console.log(JSON.stringify({ accessToken, error }))
if (error) return <div>Error: {JSON.stringify(error)}</div>
return <div>Run: {JSON.stringify(run)}</div>
}
Error:
{
"accessToken": "ACCESS_TOKEN_HERE",
"error": {
"url": "https://api.trigger.dev/realtime/v1/runs/upload-and-generate-predictions-flow?offset=-1",
"name": "FetchError",
"status": 404,
"json": {
"error": "Not found"
},
"headers": {
"content-type": "application/json; charset=utf-8"
}
}
}
Example of my decoded token:
{
"sub": "SUB",
"pub": true,
"scopes": [
"read:runs",
"read:tags:app_instance_id",
"read:tags:workspace_id",
"read:tags:user_id"
],
"iss": "https://id.trigger.dev",
"aud": "https://api.trigger.dev",
"iat": 1746068887,
"exp": 1746069787
}