Skip to content
Docs

Get access request status

GEThttps://api.vercel.com/v1/teams/{teamId}/request/{userId}
Check the status of a join request. It'll respond with a 404 if the request has been declined. If no userId path segment was provided, this endpoint will instead return the status of the authenticated user.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeamAccessRequest({
userId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
});
console.log(result);
}
run();
Response
{
"accessRequestedAt": "1588720733602",
"bitbucket": {
"login": "string"
},
"confirmed": "false",
"github": {
"login": "string"
},
"gitlab": {
"login": "string"
},
"joinedFrom": {
"commitId": "example_id",
"dsyncConnectedAt": "123",
"dsyncUserId": "example_id",
"gitUserId": "example_id",
"gitUserLogin": "string",
"idpUserId": "example_id",
"origin": "account-update",
"repoId": "example_id",
"repoPath": "string",
"ssoConnectedAt": "123",
"ssoUserId": "example_id"
},
"teamName": "My Team",
"teamSlug": "my-team"
}
AuthorizationbearerToken

Default authentication mechanism

userIdstringRequired
teamIdstringRequired
200Successfully
accessRequestedAtnumberRequired
Timestamp in milliseconds when the user requested access to the team.
bitbucketobjectRequired
Map of the connected Bitbucket account.
confirmedbooleanRequired
Current status of the membership. Will be true if confirmed, if pending it'll be false.
githubobjectRequired
Map of the connected GitHub account.
gitlabobjectRequired
Map of the connected GitLab account.
joinedFromobjectRequired
A map that describes the origin from where the user joined.
teamNamestringRequired
The name of the team.
teamSlugstringRequired
The slug of the team.
400One of the provided values in the request query is invalid. User is already a confirmed member of the team and did not request access. Only visible when the authenticated user does have access to the team.
403You do not have permission to access this resource.
404The provided user doesn't have a membership. Team was not found.
410Error