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
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 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 |
|
create(provider, request_body)
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 |
Returns:
Type | Description |
---|---|
Response[Credential]
|
The created Credential. |
Source code in nylas/resources/credentials.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
destroy(provider, credential_id)
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 |
Returns:
Type | Description |
---|---|
DeleteResponse
|
The deletion response. |
Source code in nylas/resources/credentials.py
115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
find(provider, credential_id)
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 |
Returns:
Type | Description |
---|---|
Response[Credential]
|
The Credential. |
Source code in nylas/resources/credentials.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
list(provider, query_params=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
|
Returns:
Type | Description |
---|---|
ListResponse[Credential]
|
The list of credentials. |
Source code in nylas/resources/credentials.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
update(provider, credential_id, request_body)
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 |
Returns:
Type | Description |
---|---|
Response[Credential]
|
The updated credential. |
Source code in nylas/resources/credentials.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|