Privileged API Keys Only
Special permission is required to access this service. Please contact api-support@sparkplatform.com or your API key provider to request access to this data.

Developers: Authorizations

Most API keys require authorizations to be granted in order to access data on behalf of users.

  1. Supported Roles
  2. Available Services
    1. All Authorizations for a Key
    2. Creating a new Authorization for a User
    3. Revoking an Authorization
  3. Developer Authorization Description
  4. Expansions
  5. API Explorer

Supported Roles

Role Reads Writes Notes
IDX No No
Public No No
VOW No No
Portal No No
Private Yes Yes Only accessible by MLS and association users, and by API keys granted explicit permission.
More information about roles may be found here.

Available Services

All Authorizations for a Key

URI: /<API Version>/developers/identities/<Identity.Id>/keys/<Key.Id>/authorizations

HTTP Method Description Conditional Notes
GET Returns all existing authorizations for a key No
POST Returns HTTP 405 (Method Not Allowed) No Not implemented
PUT Returns HTTP 405 (Method Not Allowed) No Not implemented
DELETE Returns HTTP 405 (Method Not Allowed) No Not implemented

GET Request

Parameters:
  • None

GET Response

{
    "D": {
        "Success": true,
        "Results": [
          {
            "Id": 100,
            "ResourceUri": "/vX/developers/identities/5/keys/56/authorizations/100",
            "User": {
              "Id": "20110112234857732941000000",
              "ResourceUri": "/v1/accounts/20110112234857732941000000",
              "UserType": "Member",
              "Name": "Joe Realtor",
              "OfficeId": "20100113238853732842000000",
              "Office": "Joe's Realty",
              "CompanyId": null,
              "Company": null,
              "FbsIdxCustomer": false,
              "MlsId": "20100127075503180752000000"
            },
            "ModificationTimestamp": "2014-06-27T10:01:06-05:00",
            "CreatedTimestamp": "2014-06-27T10:01:06-05:00"
          }
        ]
    }
}

Creating a new Authorization for a User

URI: /<API Version>/developers/identities/<Identity.Id>/keys/<Key.Id>/authorizations

HTTP Method Description Conditional Notes
GET Returns HTTP 405 (Method Not Allowed) No Not implemented
POST Creates a new authorization for a user No
PUT Returns HTTP 405 (Method Not Allowed) No Not implemented
DELETE Returns HTTP 405 (Method Not Allowed) No Not implemented

POST Request

Request body:
{
    "D": {
        "Success": true,
        "Results": [
          {
            "User": {
              "Id": "20160223193314061239000000"
            }
          }
        ]
    }
}

POST Response

{
    "D": {
        "Success": true,
        "Results": [
          {
            "Id": 101,
            "ResourceUri": "/vX/developers/identities/5/keys/56/authorizations/101",
            "AccessToken": "...",
            "RefreshToken": "...",
            "User": "",
            "ModificationTimestamp": "2014-06-27T10:01:06-05:00",
            "CreatedTimestamp": "2014-06-27T10:01:06-05:00"
          }
        ]
    }
}
      

Revoking an Authorization

URI: /<API Version>/developers/identities/<Identity.Id>/keys/<Key.Id>

HTTP Method Description Conditional Notes
GET Returns HTTP 405 (Method Not Allowed) No Not implemented
POST Returns HTTP 405 (Method Not Allowed) No Not implemented
PUT Returns HTTP 405 (Method Not Allowed) No Not implemented
DELETE Deletes the authorization, preventing access with the corresponding access token. No

DELETE Request

Parameters:
  • None

DELETE Response

The standard success/fail response is returned.

Authorization Description

Attribute Data Type Writeable Required Description
Id Integer No No The unique id for the authorization record.
ResourceUri Character No No The URI to the authorization record..
AccessToken Character No No The token used to access data from Spark for OAuth2 keys only.
Only obtainable immediate after creation.
RefreshToken Character No No The refresh token, used to generate a new access token when the current token expires (OAuth2 keys only).
Only obtainable immediate after creation.
User Accounts Data Yes No The account information for the user the authorization is on behalf of.
CreatedTimestamp Timestamp No No The time the authorization was created.
ModificationTimestamp Timestamp No No The time the authorization was last updated.

Expansions

None.

API Explorer

The API Explorer does not currently support this service.