credentials
Credentials
Bases: ListableApiResource
, FindableApiResource
, CreatableApiResource
, UpdatableApiResource
, DestroyableApiResource
Nylas Credentials API
A Nylas connector credential is a special type of record that securely stores information that allows you to connect using an administrator account
Source code in nylas/resources/credentials.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
create(provider, request_body, overrides=None)
Create a credential for a particular provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
Provider
|
The provider. |
required |
request_body |
CredentialRequest
|
The values to create the Credential with. |
required |
overrides |
RequestOverrides
|
The request overrides to use for the request. |
None
|
Returns:
Type | Description |
---|---|
Response[Credential]
|
The created Credential. |
Source code in nylas/resources/credentials.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
destroy(provider, credential_id, overrides=None)
Delete a credential.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
Provider
|
the provider for the grant |
required |
credential_id |
str
|
The ID of the credential to delete. |
required |
overrides |
RequestOverrides
|
The request overrides to use for the request. |
None
|
Returns:
Type | Description |
---|---|
DeleteResponse
|
The deletion response. |
Source code in nylas/resources/credentials.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
find(provider, credential_id, overrides=None)
Return a credential.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
Provider
|
The provider of the credential. |
required |
credential_id |
str
|
The ID of the credential to retrieve. |
required |
overrides |
RequestOverrides
|
The request overrides to use for the request. |
None
|
Returns:
Type | Description |
---|---|
Response[Credential]
|
The Credential. |
Source code in nylas/resources/credentials.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
list(provider, query_params=None, overrides=None)
Return all credentials for a particular provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
Provider
|
The provider. |
required |
query_params |
ListCredentialQueryParams
|
The query parameters to include in the request. |
None
|
overrides |
RequestOverrides
|
The request overrides to use for the request. |
None
|
Returns:
Type | Description |
---|---|
ListResponse[Credential]
|
The list of credentials. |
Source code in nylas/resources/credentials.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
update(provider, credential_id, request_body, overrides=None)
Update a credential.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
Provider
|
The provider. |
required |
credential_id |
str
|
The ID of the credential to update. |
required |
request_body |
UpdateCredentialRequest
|
The values to update the credential with. |
required |
overrides |
RequestOverrides
|
The request overrides to use for the request. |
None
|
Returns:
Type | Description |
---|---|
Response[Credential]
|
The updated credential. |
Source code in nylas/resources/credentials.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|