Support Article
Error occurs while configuring Twitter integration
SA-61496
Summary
Error occurs while configuring Twitter integration for Pega Customer Service (CS) 7.31. This occurs when authorizing an OAuth profile.
Error Messages
The request token for this page is invalid. It may have been already been used, or expired because it is too old. Please go back to the site or application that sent you here and try again; it was probably just a mistake.
Steps to Reproduce
- Create a new Twitter application.
- Generate tokens and perform all the required configurations for Twitter.
- Launch the Interaction portal.
- Navigate to Operator Preferences.
- Authorize for Twitter.
Root Cause
Due to recent updates from Twitter, callback URLs are mandatory to authorize the Twitter application.
Pega generates the callback URLs dynamically in the 'pyGetRequestToken' activity (if changes from the platform are received). Additionally, the same callback URL must be provided explicitly in the Twitter application.
For example: https://<LocalHost>/prweb?pyActivity=@baseclass.GenerateTwitterTokens
For this, the requestor and thread ID must be passed dynamically. As part of implementation, the URL is passed accordingly and the required parameters are set dynamically in the 'GenerateTwitterTokens' and 'pyGetAccessTokens' activities.
Resolution
Apply HFix-45793.
Additional Steps:
The callback URL format is 'http://<LocalHost:portnumber>/prweb?pyActivity=Data-Admin-Security-OAuth-Client.GenerateTwitter'. This is generated in Pega. To authorize the Twitter application, the URL generated in Pega must be provided in the Twitter application callback URL.
Tags:
Published September 12, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.