---
title: Social IdP profile transformation scripting API
description: "Transform a social identity provider's raw profile into a normalized object using PingAM's scripting API"
component: pingam
version: 7.5
page_id: pingam:am-scripting:social-idp-profile-transformation-api
canonical_url: https://docs.pingidentity.com/pingam/8.1/am-scripting/social-idp-profile-transformation-api.html
llms_txt: https://docs.pingidentity.com/pingam/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["Scripting"]
page_aliases: ["scripting-guide:social-idp-profile-transformation-api.adoc"]
superseded_by: https://docs.pingidentity.com/pingam/8.1/am-scripting/social-idp-profile-transformation-api.html
---

# Social IdP profile transformation scripting API

The following bindings are available when you [configure a script](../am-authentication/social-idp-client-reference.html#transform-script) to transform the identity provider (IdP)'s raw profile into a normalized object.

|   |                                                                                                                                                                                                                 |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | The social IdP transformation script is a legacy script and therefore has access to all the *legacy* [common bindings](script-bindings.html) such as `logger` and `realm`, in addition to those described here. |

| Binding             | Description                                                                                                                                                                                                  |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `nodeState`         | Access the shared state of the tree.Learn more about the `nodeState` methods in [Access shared state data](scripting-api-node.html#scripting-api-node-nodeState).                                            |
| `rawProfile`        | The object that stores the social IdP profile attributes in the format received by the provider. For example, `rawProfile.first_name` stores the given name for a Facebook profile.                          |
| `requestHeaders`    | Access the HTTP headers provided in the login request by calling `String[] requestHeaders.get(String header)`.For example:```
var hostName = requestHeaders.get("host").get(0);
```                          |
| `requestParameters` | Access the HTTP request parameters provided in the login request by calling `String[] requestParameters.get(String param)`.For example:```
var authType = requestParameters.get("authIndexType").get(0);
``` |
| `selectedIdp`       | The social identity provider name. For example: `google`.                                                                                                                                                    |
