Typetalk v0.2.0 Typetalk.AuthorizationCode

Function to get an access token using an authorization code.

You use this module when you offer a web service to other people.

Link to this section Summary

Link to this section Functions

Link to this function access_token(client_id, client_secret, redirect_uri, code)
access_token(String.t(), String.t(), String.t(), String.t()) ::
  {:ok, Typetalk.AccessToken.t()} | {:error, HTTPoison.Response}

Returns an access token and related information.

Example

{:ok, auth} = Typetalk.AuthorizationCode.access_token("your-client-id",
                                                      "your-client-secret",
                                                      "https://example.com/oauth_callback",
                                                      "code-returned-by-server")

API Doc

API Doc

Link to this function authorization_url(client_id, redirect_url, scope \\ "my,topic.read,topi.post")
authorization_url(String.t(), String.t(), String.t()) :: String.t()

Returns a URL for the authorization

API Doc

API Doc