Secrets File - osmlab/name-suggestion-index GitHub Wiki

In order to successfully run npm run wikidata, you first have to add a secrets.json file in the project root (same folder as package.json and README.md etc.) of your local copy of the NSI repository. This file will not be added to the public repo on your next commit as the file is listed in .gitignore (and is thus ignored when a list of changed files is generated).

Here is the format of the secrets file:

{
  "wikibase": {
     "oauth": {
       "consumer_key": "consumer-token",
       "consumer_secret": "consumer-secret",
       "token": "access-token",
       "token_secret": "access-secret"
     }
  }
}

An OAuth 1.0a application is needed to obtain the required credentials consumer-token, consumer-secret, access-token, and access-secret. You can register for these credentials at https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose/oauth1a.

[!warning] Make sure to select "Edit existing pages" and "Edit protected pages" under "Applicable grants" when registering; the default "Basic rights" selection does not permit the editing actions coded into npm run wikidata.