1. Docs
  2. API Reference
  3. Refresh access token

Refresh access token

POST/v1/auth/refresh

Request body

Code samples

cURLJavaScriptPythonGo
curl -X POST "https://api.canopy.dev/v1/auth/refresh" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200 New tokens returned
{
  "access_token": "string",
  "token_type": "string",
  "expires_in": 0,
  "user": {
    "id": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string"
  },
  "default_environment_slug": "string"
}

application/json

  • access_tokenstring*
  • token_typestring*
  • expires_innumber*
  • userAuthUserDto
  • default_environment_slugstring
401 Invalid or expired token

Returned object

On this page

Related endpoints

POSTRegister a new user
POSTLook up invite details by token
POSTAccept an invite
POSTAuthenticate and receive tokens
POSTSelect an Application from a pre-auth session (post-login picker)
POSTSwitch the active Application in an authenticated session
POSTLogout and revoke tokens
GETVerify email address
POSTResend verification email
POSTRequest password reset
POSTReset password with token
POSTChange password (authenticated)
GETGet current user profile
GETGet current user permissions
GETList the Accounts the current user belongs to
GETList active sessions
DELETERevoke all sessions
DELETERevoke a specific session