source/auth/add

Add one or more authorization credentials to a Managed Source.

An HTTPS PUT request sent to:

https://api.datasift.com/v1.3/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:

  • true, t, or 1
  • false, f, or 0

Defaults to true.

See also: source/resource/add

Examples

  1. Add one new authorization credential to an existing Managed Source and skip validation:

    curl -X PUT https://api.datasift.com/v1.3/source/auth/add 
        -d 'id=da4f8df71a0f43698acf9240b5ad668f' 
        -d 'auth = [{"parameters": {"value": "CAACEdEose0cB1...."}}]' 
        -d 'validate = ["false"]' 
        -H Authorization:datasift-user:datasift-key

  2. Add three new authorization credentials to an existing Managed Source. We have not included the validate parameter so it defaults to true and validation is performed:

    curl -X PUThttps://api.datasift.com/v1.3/source/auth/add 
        -d 'id=da4f8df71a0f43698acf9240b5ad668f' 
        -d 'auth=[{"parameters": {"value": "CAACEdEose0cB1...."}}, 
        {"parameters": {"value": "CAACEdEose0cB2...."}}, 
        {"parameters": {"value": "CAACEdEose0cB3...."}}]' 
        -H Authorization:datasift-user:datasift-key

Notes

  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.3.

Resource information

Rate limit cost: 25

Requires authentication: Yes

Response formats: JSON, JSONP