# CJ Affiliate setup for PopMCP

You paste two values into PopMCP: a personal access token from the CJ Developer Portal, and your company id (CID) from CJ Account Manager. PopMCP works out whether the company is a publisher or an advertiser.

- Auth: API credentials
- Setup time: 2 min
- API base URL: https://commissions.api.cj.com/query
- Credentials screen: https://developers.cj.com/account/personal-access-tokens
- Provider docs: https://developers.cj.com/authentication/overview

## Before you begin

- A CJ login for the publisher or advertiser company you want to connect
- Nothing to apply for: anyone with a CJ login can register a token
- Only for advertisers sending orders: an enterprise id, which your CJ account manager can give you

## Get your credentials

### 1. Register a personal access token

Go to the CJ Developer Portal and sign in with your CJ login. Open Personal Access Tokens. Type any name you will recognise into Token Name, such as PopMCP, and select Register.

Screen: https://developers.cj.com/account/personal-access-tokens

### 2. Copy the token

CJ shows the new token once. Copy all of it before you leave the page. It works like a password and reaches every CJ company your login belongs to, so keep it out of chats and shared files.

Screen: https://developers.cj.com/authentication/overview

### 3. Find your company id

Sign in to CJ Account Manager at members.cj.com. Select your company name at the top right. The number shown as CID is your company id. If you belong to several companies, switch to the one you want first: each PopMCP connection is for one company.

Screen: https://members.cj.com

### 4. Paste both into PopMCP

In PopMCP, paste the token into Personal access token and the number into Company id (CID), then connect. PopMCP checks them with CJ and works out whether the company is a publisher or an advertiser. The connection is then locked to that company.

### 5. Optional: add an enterprise id

Only for advertisers who will send orders through the AI. CJ issues this number, so ask your CJ account manager for it. In PopMCP, open More options and enter it into Enterprise id. Without it, the AI asks for the number with each order.

Screen: https://developers.cj.com/docs/advertiser-api-tracking/api-overview

## Fields PopMCP asks for

- Personal access token (apiToken) [required]: On the CJ Developer Portal, sign in with your CJ login and open Personal Access Tokens. Enter a token name and choose Register, then copy the token. CJ shows it only once. Stored encrypted.
- Company id (CID) (companyId) [required]: In CJ Account Manager, select your company name at the top right. The number shown as CID is your company id.
- Enterprise id (optional) (enterpriseId): Only for advertisers sending orders through CJ's Tracking API. Your CJ account manager can give you this number.
- Account type (optional) (accountType): We work this out for you. Only fill it in if connecting says we cannot tell which kind of company this is.

## Verify

PopMCP marks the CJ connection Verified with the company id, and records whether it is a publisher or an advertiser. A publisher connection also shows the name of its primary promotional property. Asking the AI for commission in the last 30 days returns totals by advertiser or publisher.

## Troubleshooting

### CJ did not accept this token

Cause: undefined

Fix: The token was removed or not copied whole. CJ shows a token only once, so register a new one on the Personal Access Tokens page and paste that.

### This token cannot open CJ company

Cause: undefined

Fix: Check the number shown as CID when you select your company name in CJ Account Manager, and that you registered the token while signed in as someone in that company.

### We cannot tell whether the company is a publisher or an advertiser

Cause: undefined

Fix: If your token and company id are right, open More options and enter publisher or advertiser into Account type.

### Commission comes back empty

Cause: undefined

Fix: CJ answers with no rows, not an error, when nothing matches. Check the date range, and remember that with no dates the commission list only covers the last 24 hours. Ask for the last 30 days instead.

### Link code is blank

Cause: undefined

Fix: CJ leaves link code blank for advertisers you have not joined. Apply to the advertiser's program in CJ first.

### An order was accepted but never shows up

Cause: undefined

Fix: CJ can take over an hour to process an order, and drops one it cannot match to a publisher. Check commissions later. If it is still missing, your CJ contact can look it up.

### A call is refused for too many requests

Cause: undefined

Fix: CJ allows 25 calls a minute on its lookup and link tools, 200 in 5 minutes on commissions, and 500 in 5 minutes on products. Wait a minute and try again.

---

Source: https://www.docs.popmcp.com/docs/integrations/cj-affiliate/