grants
CreateGrantRequest
Bases: TypedDict
Interface representing a request to create a grant.
Attributes:
Name | Type | Description |
---|---|---|
provider |
Provider
|
OAuth provider. |
settings |
Dict[str, Any]
|
Settings required by provider. |
state |
NotRequired[str]
|
Optional state value to return to developer's website after authentication flow is completed. |
scope |
NotRequired[List[str]]
|
Optional list of scopes to request. If not specified it will use the integration default scopes. |
Source code in nylas/models/grants.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
Grant
dataclass
Interface representing a Nylas Grant object.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
Globally unique object identifier. |
provider |
str
|
OAuth provider that the user authenticated with. |
scope |
List[str]
|
Scopes specified for the grant. |
created_at |
int
|
Unix timestamp when the grant was created. |
grant_status |
Optional[str]
|
Status of the grant, if it is still valid or if the user needs to re-authenticate. |
email |
Optional[str]
|
Email address associated with the grant. |
user_agent |
Optional[str]
|
End user's client user agent. |
ip |
Optional[str]
|
End user's client IP address. |
state |
Optional[str]
|
Initial state that was sent as part of the OAuth request. |
updated_at |
Optional[int]
|
Unix timestamp when the grant was updated. |
provider_user_id |
Optional[str]
|
Provider's ID for the user this grant is associated with. |
settings |
Optional[Dict[str, Any]]
|
Settings required by the provider that were sent as part of the OAuth request. |
Source code in nylas/models/grants.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
ListGrantsQueryParams
Bases: TypedDict
Interface representing the query parameters for listing grants.
Attributes:
Name | Type | Description |
---|---|---|
limit |
NotRequired[int]
|
The maximum number of objects to return. This field defaults to 10. The maximum allowed value is 200. |
offset |
NotRequired[int]
|
Offset grant results by this number. |
sortBy |
NotRequired[str]
|
Sort entries by field name |
orderBy |
NotRequired[str]
|
Specify ascending or descending order. |
since |
NotRequired[int]
|
Scope grants from a specific point in time by Unix timestamp. |
before |
NotRequired[int]
|
Scope grants to a specific point in time by Unix timestamp. |
email |
NotRequired[str]
|
Filtering your query based on grant email address (if applicable) |
grantStatus |
NotRequired[str]
|
Filtering your query based on grant email status (if applicable) |
ip |
NotRequired[str]
|
Filtering your query based on grant IP address |
provider |
NotRequired[Provider]
|
Filtering your query based on OAuth provider |
Source code in nylas/models/grants.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
UpdateGrantRequest
Bases: TypedDict
Interface representing a request to update a grant.
Attributes:
Name | Type | Description |
---|---|---|
settings |
NotRequired[Dict[str, Any]]
|
Settings required by provider. |
scope |
NotRequired[List[str]]
|
List of integration scopes for the grant. |
Source code in nylas/models/grants.py
62 63 64 65 66 67 68 69 70 71 72 |
|