Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Tracking
    • Exceptions
    • Services
  • PHP

Classes

  • CtctOAuth2
  • SessionDataStore

Interfaces

  • CtctDataStore
  • Overview
  • Namespace
  • Class
  • Tree

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 Ctct/Auth/CtctOAuth2.php
Methods summary
public
# __construct( mixed $clientId, mixed $clientSecret, mixed $redirectUri, mixed $restClient = null )
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
boolean
$server - Whether or not to use OAuth2 server flow, alternative is client flow
$state
string
$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
string
$code - code returned from Constant Contact after a user has granted access to their account

Returns

array

Throws

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

Get an information about an access token

Get an information about an access token

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token

Returns

array

Throws

Ctct\Exception\CtctException
Properties summary
public mixed $clientId
#
public mixed $clientSecret
#
public mixed $redirectUri
#
public mixed $props
#
Appconnect PHP SDK API documentation generated by ApiGen 2.8.0