---
schema_version: "1"
id: cde7c300150348438a3fd0456989d26ca8200a905e4d1ad155fc76deb0ba14da
title: Invoke Cache Migration when OAuth2 is Deployed
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-invoke-cache-migration-when-oauth2-is-deployed.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-invoke-cache-migration-when-oauth2-is-deployed.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 05f468f43a254c07f44efc5c5ec67b269494e90d6580827af37efba04b8a526f
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Invoke Cache Migration when OAuth2 is Deployed

Make sure you have completed the [DCG OAuth2 Setup and Usage](https://developer.salesforce.com/docs/industries/cme/guide/comms-t-dcg-oauth2-setup-and-usage.md) and received the credentials from Technical Support. When OAuth2 credentials are mentioned in this topic, use the `cmig` set of credentials.

If you are using ​Salesforce Industries Communications, Media, and Energy Fall '20 or later, then set the following parameter values:

| Parameter                         | Value                                                                             |
| --------------------------------- | --------------------------------------------------------------------------------- |
| CacheAPI.ExternalSystemAuthHeader | JSON with { "oauth2_server":"" , "customer_app_key":"" ,"customer_app_secret":""} |
| oauth2_server                     | OAuth2 URL                                                                        |
| customer_app_key                  | OAuth2 application key                                                            |
| customer_app_secret               | OAuth2 application secret                                                         |

For example:

`{ "oauth2_server": "vlocity-exaple.amazoncognito.com", "customer_app_key": "testKey", "customer_app_secret": "testSecret" }`

Then, add the URL to the remote site URL.

For versions Salesforce Industries Communications, Media, and Energy Summer '20 and prior, you can migrate CachedAPIResponse\_\_c records from the Salesforce platform to DCG when OAuth2 is deployed by using the:

- Command Line Interface: Obtain the OAuth2 JWT token and call GET /cm/migrate endpoint.

- GUI (this solution is valid for one hour, after which the CacheAPI.ExternalSystemAuthHeader needs to be updated again).

  - Obtain the OA uth2 JWT token.

  - Replace the CacheAPI.ExternalSystemAuthHeader field with the Bearer token value (oauth2_jwt_token_value).

  - Make the API GET call.
