X (formerly Twitter) Social Connection Cannot Fetch the Email Attribute when Migrating from Rules to Actions

Overview

X Social Connection does not retrieve the user’s email attribute by default.

There is a Rule template, “Get email address from Twitter,” that hits X API to get the email attribute. The Rule uses access_token and access_token_secret in the user.identities array. However, these two values are not visible in event.user.identities array in Actions.

This article details how can this Rule be migrated to Actions.

Applies To

  • Social Connection
  • X / Twitter
  • Actions

Cause

The event.user.identities array in Actions does not have the Identity Provider’s access_token and access_token_secret information.

Solution

Using Management API in Actions is the only available approach.

NOTE: Management API has lower late limits than Authentication API. Call this API conditionally to avoid unnecessary rate limit consumption.

This Management API endpoint returns access_token and access_token_secret: