Unauthorized error when doing npx supabase link

Hey team , just wanted some help on something, so Im trying to run
 npx supabase link --project-ref <project_id>  


However I get the error attached below, I ran this with debug flag, will replace my project id with ttt but can confirm it matches the project id I give in the project ref flag, just wondering is there another set up I need to do? Main goal is to be able to push migrations to a user project and have this working in a docker container automatically

Loading project ref from flag: ttt
Using access token for profile: supabase
2025/10/17 00:16:18 HTTP GET: https://api.supabase.com/v1/projects/ttt
Unexpected error retrieving remote project status: {"message":"Unauthorized"}
Was this page helpful?