{"record":{"id":"8b8ac3955d2ebcae","repo":"ipfs/kubo","slug":"service-endpoint-should-be-provided-without-the-p","errorCode":null,"errorMessage":"service endpoint should be provided without the /pins suffix","messagePattern":"service endpoint should be provided without the /pins suffix","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/pin/remotepin.go","lineNumber":810,"sourceCode":"\nfunc normalizeEndpoint(endpoint string) (string, error) {\n\turi, err := neturl.ParseRequestURI(endpoint)\n\tif err != nil || !(uri.Scheme == \"http\" || uri.Scheme == \"https\") {\n\t\treturn \"\", fmt.Errorf(\"service endpoint must be a valid HTTP URL\")\n\t}\n\n\t// cleanup trailing and duplicate slashes (https://github.com/ipfs/kubo/issues/7826)\n\turi.Path = gopath.Clean(uri.Path)\n\turi.Path = strings.TrimSuffix(uri.Path, \".\")\n\turi.Path = strings.TrimSuffix(uri.Path, \"/\")\n\n\t// remove any query params\n\tif uri.RawQuery != \"\" {\n\t\treturn \"\", fmt.Errorf(\"service endpoint should be provided without any query parameters\")\n\t}\n\n\tif strings.HasSuffix(uri.Path, \"/pins\") {\n\t\treturn \"\", fmt.Errorf(\"service endpoint should be provided without the /pins suffix\")\n\t}\n\n\treturn uri.String(), nil\n}\n","sourceCodeStart":792,"sourceCodeEnd":815,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/pin/remotepin.go#L792-L815","documentation":"`normalizeEndpoint` also rejects endpoints whose path ends in `/pins`. The Pinning Service API client (`pinclient`) appends `/pins` itself when calling list/create endpoints, so a pre-suffixed endpoint would yield doubled paths like `/pins/pins` and broken requests. Kubo fails fast at registration/use time instead.","triggerScenarios":"Registering a service endpoint copied from API docs or a browser, e.g. `https://api.web3.storage/pins` or `https://api.pinata.cloud/psa/pins`, instead of the base endpoint.","commonSituations":"Copy-pasting the full PSA endpoint shown in a provider's curl examples; assuming kubo wants the exact endpoint you'd curl manually; provider docs listing the `/pins` resource URL rather than the service base URL.","solutions":["Strip the trailing `/pins` from the endpoint before registering: use `https://api.web3.storage` (or the provider's base path like `https://api.pinata.cloud/psa`).","Consult the provider's kubo/IPFS pinning docs for the recommended base endpoint value.","If already registered with the wrong URL, remove and re-add: `ipfs pin remote rm <name>` then `ipfs pin remote add <name> <base-endpoint> --key=<key>`.","Remember kubo appends `/pins` automatically, so the stored endpoint must be the service root."],"exampleFix":"// before\nipfs pin remote add web3.storage https://api.web3.storage/pins --key=$KEY\n// after\nipfs pin remote add web3.storage https://api.web3.storage --key=$KEY","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nEP=\"$2\"\nif [[ \"$EP\" == */pins ]]; then\n  echo \"stripping redundant /pins suffix\"\n  EP=\"${EP%/pins}\"\nfi\nipfs pin remote add \"$1\" \"$EP\" --key=\"$KEY\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember kubo appends /pins automatically; register the base URL only","Follow provider docs' kubo-specific endpoint, not generic curl examples","Normalize endpoints in provisioning scripts before registering"],"tags":["validation","url","remote-pinning","endpoint-format"],"backgroundTag":"invalid-url","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}