Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/v1-ready/attio/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Api extends OAuth2Requester {
`https://app.attio.com/authorize?client_id=${this.client_id}&redirect_uri=${this.redirect_uri}&response_type=code&scope=${this.scope}&state=${this.state}`
);
this.tokenUri = 'https://app.attio.com/oauth/token';
this.tokenDetailsUri = 'https://app.attio.com/oauth/introspect';
this.isRefreshable = false;

this.URLs = {
userDetails: '/self',
Expand All @@ -34,6 +36,13 @@ class Api extends OAuth2Requester {
return this._get(options);
}

async getTokenDetails() {
const options = {
url: this.tokenDetailsUri,
};
return this._post(options);
}

async listObjects() {
const options = {
url: this.baseUrl + this.URLs.objects,
Expand Down
2 changes: 1 addition & 1 deletion packages/v1-ready/attio/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Definition = {
},
apiPropertiesToPersist: {
credential: [
'access_token', 'refresh_token'
'access_token'
],
entity: [],
},
Expand Down
Loading