Access Tokens
Access Tokens allow a developer to authenticate SDK requests on behalf of a specific Catalytic user. Each Access Token must be approved by the user on whose behalf it grants access. That approval can be done either explicitly by logging in to the Catalytic Web App and approving a specific Access Token request, or by supplying their email and password when creating a new Access Token.
For more details on creating Access Tokens
or how Access Tokens
are used to authenticate in the SDK, please see the preceding Authentication section.
The AccessTokens
client provides the following methods:
Method | Description |
---|---|
Get GetAsync | Gets a specific Access Token by ID |
Find FindAsync | Fetch all of your Access Tokens |
Create CreateAsync | Creates a new Access Token with your email and password Not supported for teams with SSO enabled |
CreateWithWebApprovalFlow CreateWithWebApprovalFlowAsync | Creates a new Access Token to be approved via the Account page in the Catalytic Web App Supported for all teams with or without SSO |
WaitForApproval WaitForApprovalAsync | Waits for an Access Token created with CreateWithWebApprovalFlow to be approved in the Catalytic Web App |
GetApprovalUrl | Gets the URL that the user should be directed to to approve the Access Token created with CreateWithWebApprovalFlow |
OpenUrl | A helper method for desktop apps to open the token approval URL that works across Windows, OSX and Linux |
Revoke RevokeAsync | Revokes an Access Token so it can no longer be used |
Quickstart Example
/*
* This example demonstrates creating a new Access Token using your
* email and password
*/
using Catalytic.Sdk;
namespace Catalytic.Sdk.Examples
{
class Program
{
static void Main(string[] args)
{
var catalytic = new CatalyticClient();
var accessToken = catalytic.AccessTokens.Create(
"your-team.pushbot.com",
"your-email",
"your-password");
}
}
}
Updated almost 4 years ago