- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi there,
From the documentation follow the steps to create Secrets Manager with clientId
and clientSecret
and encrypt it using KMS Key, which has permission attached to be accessed by AppFlow. (You can skip this step, if it is already configured)
There are two methods to create connector profile in Salesforce.
Method 1: With authCode
{
"connectorProfileName": "<connector name>",
"connectorType": "Salesforce",
"connectionMode": "Public",
"connectorProfileConfig": {
"connectorProfileProperties": {
"Salesforce": {
"instanceUrl": "InstanceURL",
"isSandboxEnvironment": true
}
},
"connectorProfileCredentials": {
"Salesforce": {
"clientCredentialsArn": "arn:aws:secretsmanager:{Region}:{Account-Id}:secret:{SecretKey}",
"oAuthRequest": {
"authCode": "<AuthCode>",
"redirectUri": "<RedirectUri>"
}
}
}
}
}
Method 2: Without AuthCode
{
"connectorProfileName": "<connector name>",
"connectorType": "Salesforce",
"connectionMode": "Public",
"connectorProfileConfig": {
"connectorProfileProperties": {
"Salesforce": {
"instanceUrl": "InstanceURL",
"isSandboxEnvironment": true
}
},
"connectorProfileCredentials": {
"Salesforce": {
"accessToken": "<AccessToken>",
"refreshToken": "<RefreshToken>"
}
}
}
}
How to generate authCode ?
Auth code can be generated using URL: https://<DOMAIN>/services/oauth2/authorize?response_type=code&client_id=<CONSUMER_KEY>&redirect_uri=<Redirect_Url>
NOTE:
- <DOMAIN_URL> and <CONSUMER_KEY> can be viewed in Salesforce "My Domain" and "Manage Connected Apps" respectively.
- redirect_uri = Callback URL configured in your Salesforce Connected App
Generated authCode
can be used in creating connector profile using Method 1
How to generate AccessToken and RefreshToken ?
Once you get AuthCode from previous step, accessToken
and refreshToken
can be generated using below method:
$ curl --location --request POST 'https://login.salesforce.com/services/oauth2/token?code=<authcode>&grant_type=authorization_code&client_id=<CONSUMER_KEY>&client_secret=<CONSUMER_SECRET>&redirect_uri=<redirectURI>'
Sample Output:
{ "access_token": "XXXXX", "refresh_token": "XXXXX", "signature": "XXXXX", "scope": "refresh_token SOMETHING", "id_token": "XXXXX", "instance_url": "InstanceURL", "id": "https://login.salesforce.com/id/XXXXX/XXXXX ", "token_type": "Bearer", "issued_at": "XXXXX" }
access_token
and refresh_token
can be used in creating connector profile using Method 2
Contenus pertinents
- demandé il y a 6 mois
- demandé il y a 9 jours
- demandé il y a un mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans