Help
Webgains credentials
Where to find each Webgains credential Affilitera asks for, who can create it, and what each connection error means.
Last updated
Webgains connects with a Personal Access Token, your Publisher ID and the Campaign (Site) ID of the site you promote. All three are needed.
Personal Access Token
A Personal Access Token from the Webgains Smart Publisher Platform. Affilitera sends it as a Bearer token on every call to Webgains' API.
Where to find it
- Sign in to the Webgains Smart Publisher Platform.
- Click your user name at the top right.
- Choose Manage API tokens, then Generate new token.
- Give the token a name, then click Copy token.
Expiry and rotation: The token is long-lived and is shown only once, when it is generated. Copy it straight away. Webgains allows at most two tokens.
Publisher (Account) ID
Your numeric Webgains Publisher ID. It identifies your account on nearly every Webgains API request.
Where to find it
- Sign in to the Webgains Smart Publisher Platform.
- Open Account in the bottom-left menu, then Publisher Account.
- Copy your Publisher ID.
Campaign (Site) ID
The numeric Campaign (Site) ID of the site you promote. Webgains uses it to pick the site for offers, coupons, feeds and tracking links.
Where to find it
- In the Webgains Smart Publisher Platform, open Account → Publisher Account → Sites.
- Copy the ID of your site.
Common errors
These are the messages a Webgains connection can show on its row in My Network, or after Test connection.
Webgains: personalAccessToken not configured
The connection has no Personal Access Token saved.
- Generate a token under your user name → Manage API tokens in Webgains.
- Paste it into Personal Access Token, save, then test again.
Webgains: publisherId not configured
The connection has no Publisher ID saved.
- Copy your Publisher ID from Account → Publisher Account in Webgains.
- Paste it into Publisher (Account) ID, save, then test again.
Webgains: campaignId not configured
The connection has no Campaign (Site) ID saved.
- Copy your site's ID from Account → Publisher Account → Sites in Webgains.
- Paste it into Campaign (Site) ID, save, then test again.
Webgains: credentials not configured
A sync ran without all three values saved.
- Save Personal Access Token, Publisher (Account) ID and Campaign (Site) ID on the connection.
- The next sync uses them.
Webgains … — … — …
Webgains refused the request. The message shows the HTTP status, the address called and the start of Webgains' reply.
- If the token may have been deleted in Webgains, generate a new one and save it.
- Check the Publisher ID and Campaign (Site) ID belong to the account the token was made in.
- Test again.
What each status on the connection means
Credentials rejected
Webgains refused the saved credentials. They were mistyped, regenerated or revoked on the Webgains side, or belong to a user who has lost access.
- Open the connection and choose Update credentials.
- Copy each value again from Webgains, using the steps in the field sections above, and save.
- Test the connection. The next sync uses the new values.
Credentials expired
A token Webgains issues for a limited time, or for one use only, is no longer valid.
- Create a new token in Webgains as described in the field section above.
- Save it on the connection and test again.
Credential missing
A value the connection needs has not been saved, so Affilitera cannot call Webgains at all.
- Open the connection and choose Update credentials.
- Fill in every required field and save.
API access off
Webgains accepted the credentials but refused the data. API or reporting access is not switched on for this account or site on the Webgains side.
- Switch on API or reporting access in Webgains (see the setup notes in the field sections above).
- Test the connection again. Nothing needs changing in Affilitera.
Account mismatch
The saved values come from different Webgains accounts, for example an ID from one account and a key from another.
- Sign in to the one Webgains account you want to connect.
- Copy every value from that same account, save, and test again.
Token save pending
Webgains issued a new token and Affilitera could not save it yet. This usually clears on its own at the next sync.
- Wait for the next sync.
- If the message stays, create a new token in Webgains and save it on the connection.
Check credentials
Webgains refused the connection with a message Affilitera does not recognize.
- Check each saved value against Webgains, using the field sections above.
- Save and test again. If it still fails, contact support and quote the message shown on the connection.