Skip to content

DEPRECATED: Spark Authentication

dgmyrek edited this page Aug 25, 2021 · 1 revision

This authentication method has been deprecated in favor of access (bearer) token authentication.

One of the options to authenticate with is using 'Spark Authentication' method. This method will NOT work for an OAuth2 client id and secret. Refer to the OAuth2 authentication options for how to use those credentials. This page goes over the Spark Authentication:

Example

# initialize the gem with your key/secret
# api_key and api_secret are the only required settings
# other options and their defaults:
#  - endpoint:   'https://api.sparkapi.com'
#  - version:    'v1'
#  - ssl:         false
#  - user_agent: 'Spark API Ruby Gem'
SparkApi.configure do |config|
    config.endpoint   = 'https://sparkapi.com'
    config.api_key    = 'my_spark_api_key'
    config.api_secret = 'my_spark_api_secret'
end

SparkApi.client.get "/system"

Spark Platform Documentation

Spark Authentication Protocol