Troubleshooting

The information in this document can help troubleshoot issues that you might encounter while you implement Subscription Linking.

Subscription Linking prompt stuck on loading screen

Error example:

Loading symbol

Figure 1. Subscription Linking prompt doesn't load.

To resolve this issue, check the following:

  • Make sure that you add the origins of the pages, including testing subdomains, as additional URLs in the publication settings of Publisher Center.
  • For Extended Access or Reader Revenue Manager Enterprise implementations, make sure that you add the origins of the pages, including testing subdomains, to the authorized JavaScript origins of the OAuth 2.0 Client you configured for such implementation. This needs to be done in Google Cloud Console.

Account couldn't be linked

Error example:

Account couldn't be linked

Figure 2. Account couldn't be linked issue.

To resolve this issue, check the following:

  • Make sure to accept the Terms of Service for Subscription Linking in the Publisher Center. To do so, go to the Subscription Linking settings and click sign the subscription linking terms of service.
  • If the Google Account has already been linked, you'll get an error message when you reattempt to link the subscription. You must unlink the subscription, through the subscriptions page in Google Account, before you repeat the client-side integration test.

Permissions error when calling the Subscription Linking API

Error example:

Code 403
Message 'readerrevenuesubscriptionlinking.readerEntitlements.update' denied on resource
'//readerrevenuesubscriptionlinking.googleapis.com/publications/example.com/readers/10078823/entitlements'
(or it may not exist)."

To resolve this issue, check the following:

  • Make sure that you use the same project as specified in the Subscription Linking setup. When you set up Subscription Linking in the Publisher Center, use the Project number. You can locate the Project number from your project dashboard.
  • Make sure that Subscription Linking API is enabled in your project.
  • In the project Identity and Access Management (IAM), make sure that the service account is granted with the role as Subscription Linking Admin. Note that the role change propagation through the system might take time. If you receive a 403 error when making API calls, even after you confirm that your service account has the correct IAM role, wait for a few moments and then try your request again.
  • If you are unsure which service accounts to use or whether they've the necessary IAM role, use the Policy Analyzer from the project that you set up for Subscription Linking. Create and run a custom query with the following query parameters:

    Parameter 1 Role
    Role Subscription Linking Admin
  • Make sure that you use the correct service account key when you call the Subscription Linking API. Inspect the following properties in your service account key (JSON file):

    • type: It must be service_account.
    • project_id: It must be the Project ID of the Project number specified in the Subscription Linking setup.
    • client_email: It must be the same service account in project IAM that's assigned with the role Subscription Linking Admin.
  • If you obtained the access token through Google OAuth 2.0 token endpoint (https://oauth2.googleapis.com/token), make sure that the token is valid and not expired when you call Subscription Linking APIs. If the token expires, you have to obtain a new one.

  • If you use the REST API, make sure that you use the Publication ID you provided in the Subscription Linking setup. For example, if your Publication ID is example.com, then the request URL must contain it.

    • ✅ Use only the configured Publication ID: publications/example.com/readers/10078823/entitlements
    • ❌ Don't use Publication ID other than the one specified in Subscription Linking configuration: publications/example-staging.com/readers/10078823/entitlements
    • ❌ Don't include the publication product in the request: publications/example.com:premium/readers/10078823/entitlements

Invalid argument error when updating the entitlement

Error example:

Message Error: Request contains an invalid argument

To resolve this issue, check the following:

  • Make sure that you provide the entitlements object in the correct format. See this example.
  • Make sure that product_id is in the format of publication_id:product.
    • ✅ Valid example: "product_id":"example.com:basic"
    • ❌ Invalid example: "product_id":"example.com"

Not seeing articles highlighted in the search results

To resolve this issue, check the following: