Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Library
      • Tracking
    • Exceptions
    • Services
    • Util
    • WebHooks

Classes

  • CtctOAuth2
  • SessionDataStore

Interfaces

  • CtctDataStore
  • Overview
  • Namespace
  • Class

Class CtctOAuth2

Class that implements necessary functionality to obtain an access token from a user

Namespace: Ctct\Auth
Package: Auth
Author: Constant Contact
Located at Auth/CtctOAuth2.php
Methods summary
public
# __construct( $clientId, $clientSecret, $redirectUri )
public string
# getAuthorizationUrl( boolean $server = true, string $state = null )

Get the URL at which the user can authenticate and authorize the requesting application

Get the URL at which the user can authenticate and authorize the requesting application

Parameters

$server
  • Whether or not to use OAuth2 server flow, alternative is client flow
$state
  • An optional value used by the client to maintain state between the request and callback.

Returns

string
$url - The url to send a user to, to grant access to their account
public array
# getAccessToken( string $code )

Obtain an access token

Obtain an access token

Parameters

$code
  • code returned from Constant Contact after a user has granted access to their account

Returns

array

Throws

Ctct\Exceptions\OAuth2Exception
public array
# getTokenInfo( string $accessToken )

Get an information about an access token

Get an information about an access token

Parameters

$accessToken
  • Constant Contact OAuth2 access token

Returns

array

Throws

Ctct\Exceptions\CtctException
Properties summary
public $clientId
#
public $clientSecret
#
public $redirectUri
#
public $client
#
public $props
#
API documentation generated by ApiGen