Which scope should be used to add/update topic tags?

In the API I am using scopes ‘repo’ and ‘admin:org’ to add new topic tags.
The API gives me errors:

response {
message: ‘Not Found’,
documentation_url: ‘https://developer.github.com/v3/repos#replace-all-topics-for-a-repository
}

The logged-in user has admin rights for the repo. The repo was created by an admin who is different than the logged-in admin user.

my link to github login looks as below:
href={https://github.com/login/oauth/authorize?scope=user&client_id=${client_id}&redirect_uri=${redirect_uri}/?owner=${context.owner}?repo=${context.repo}${context.urlStr}&scope=repo%20npm startwrite:repo_hook%20write:org}

:wave: hello there and welcome to the GitHub Support Community @nrrao!

The repo scope is required for updating a repository’s topics. However, while the response indicates a 404 Not Found error from the GitHub API, I’m not exactly sure what request was sent. That request may reveal more information around why this happened.

As a next step for troubleshooting this further, could you please send us the full request-response pair of a curl -v request that demonstrates what you’re seeing? That should help us see what’s going on here. For this, I suggest creating a personal access token and authenticate with the API by sending it in a header.

Please make sure you mask any sensitive information like OAuth tokens and Authorization headers in the the curl request-response pair.