X (formerly Twitter) Social Connection Cannot Fetch the Email Attribute

Overview

This article explains why a X Social Connection does not retrieve the user's email attribute by default.

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 to obtain the email attribute from the X API. This is a known limitation of Actions. 

Solution

Use Management API in Actions to obtain the access_token and access_token_secret. 

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:

Screenshot 2024-09-03 at 16.55.54.png
 

Recommended content

No recommended content found...