Skip to content

StackExchange

Damien edited this page May 28, 2016 · 5 revisions
// Client-side (Implicit) flow
let stackexchange: Provider = .StackExchange(
    clientID: "***",
    redirectURL: "foo://callback"
)

// Server-side (Explicit) flow
let stackexchange: Provider = .StackExchange(
    clientID: "***",
    clientSecret: "***",
    redirectURL: "foo://callback"
)
Token
// Client-side (Implicit) flow
foo://callback#access_token=ACCESS-TOKEN
Scopes
  • read_inbox - access a user's global inbox
  • no_expiry - access_token's with this scope do not expire
  • write_access - perform write operations as a user 2.1
  • private_info - access full history of a user's private actions on the site 2.1
Authorization Request Parameters
  • client_id
  • scope (details)
  • redirect_uri - must be under an apps registered domain
  • state - optional
Token Request Parameters
  • client_id
  • client_secret
  • code - from the previous step
  • redirect_uri - must be the same as the provided in the first step
Clone this wiki locally