Add one or more authorization credentials to a Managed Source.
An HTTPS PUT request sent to:
https://api.datasift.com/v1.6/source/auth/add
A successful call to this endpoint returns: 200 OK plus a JSON object. The JSON object is the same as the JSON returned by the /source/get endpoint.
Parameters
Parameter | Description |
---|---|
id required |
The id of the source you're adding authorization credentials to. |
auth required |
An array of source-specific authorization credentials. |
validate optional |
Allows you to suppress validation of the authorization credentials for the source you want to modify. Can be:
Defaults to true. See also: source/resource/add |
Examples
-
Add one new auth token to an existing Managed Source and skip validation:
curl -X PUT https://api.datasift.com/v1.6/source/auth/add \ -d 'id=da4f8df71a0f43698acf9240b5ad668f' \ -d 'auth=[{"parameters": {"value": "CAACEdEose0cB1...."}}]' \ -d 'validate=["false"]' \ -H Authorization: datasift-user:datasift-key
-
Add multiple new auth tokens to an existing Managed Source. We have not included the validate parameter so it defaults to true and validation is performed:
curl -X PUT https://api.datasift.com/v1.6/source/auth/add \ -d 'id=da4f8df71a0f43698acf9240b5ad668f' \ -d 'auth=[{"parameters": {"value": "CAACEdEose0cB1...."}}, {"parameters": {"value": "CAACEdEose0cB2...."}}, ...]' \ -H Authorization: datasift-user:datasift-key
Notes
- All calls to the API must be properly authenticated with a DataSift username and API key.
- All calls to the API must be versioned. The current version is v1.6.
Resource information
Rate limit cost: 25
Requires authentication: Yes
Response formats: JSON