Method | Description | |
---|---|---|
BuildAuthorizationUrl ( string clientId, string redirectUri, Scopes scopes ) : string |
Generates a login URL with the required parameters. Users will need to visit this URL to authorize your app to use the API on their behalf. If they accept they will be redirected to the redirectUri with two query string parameters - "state" and "code". Call BuildAuthorizationUrl if you want to specify the state value yourself to be able to prevent spoofing. "code" is used with GetAccessTokenAsync to get an access token to use with PinterestClient.
|
|
BuildAuthorizationUrl ( string clientId, string redirectUri, Scopes scopes, string state ) : string |
Generates a login URL with the required parameters. Users will need to visit this URL to authorize your app to use the API on their behalf. If they accept they will be redirected to the redirectUri with two query string parameters - "state" and "code". "state" verifies that this comes from you. "code" is used with GetAccessTokenAsync to get an access token to use with PinterestClient.
|
|
CreateRandomState ( int length = 10 ) : string |
Generates a random string that you can use to verify that the redirect back to your site or app wasn't spoofed. Pass this to BuildAuthorizationUrl to get the correct login URL.
|
|
GetAccessTokenAsync ( string clientId, string clientSecret, string code, string apiVersion = "v1" ) : Task |
Gets an access token which you can then use with PinterestClient.
|
Method | Description | |
---|---|---|
GetScope ( Scopes scopes ) : string |
public static BuildAuthorizationUrl ( string clientId, string redirectUri, Scopes scopes ) : string | ||
clientId | string | The Client ID (also known as App ID) of your app. See https://developers.pinterest.com/apps/ |
redirectUri | string |
/// The URL you want your user to be redirected to after authorizing your app.
/// The code needed for |
scopes | Scopes | The scopes you want to request from the user. |
return | string |
public static BuildAuthorizationUrl ( string clientId, string redirectUri, Scopes scopes, string state ) : string | ||
clientId | string | The Client ID (also known as App ID) of your app. See https://developers.pinterest.com/apps/ |
redirectUri | string |
/// The URL you want your user to be redirected to after authorizing your app.
/// The code needed for |
scopes | Scopes | The scopes you want to request from the user. |
state | string | A string that is added to |
return | string |
public static CreateRandomState ( int length = 10 ) : string | ||
length | int | The length of the random string. |
return | string |
public static GetAccessTokenAsync ( string clientId, string clientSecret, string code, string apiVersion = "v1" ) : Task |
||
clientId | string | The Client ID (also known as App ID) of your app. See https://developers.pinterest.com/apps/ |
clientSecret | string | The Client secret (also known as App secret) of your app. See https://developers.pinterest.com/apps/ |
code | string | The code that was passed to your |
apiVersion | string | The API version. Defaults to "v1" if left out. |
return | Task |