Refresh access token
POST
/api/auth/token
const url = 'https://api.getvespy.com/api/auth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"grantType":"refresh_token","grant_type":"refresh_token"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.getvespy.com/api/auth/token \ --header 'Content-Type: application/json' \ --data '{ "grantType": "refresh_token", "grant_type": "refresh_token" }'Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
accessToken
required
string
expiresIn
required
integer
tokenType
required
string
user
required
object
email
required
string format: email
emailConsentAt
required
string format: date-time
fullName
required
string
id
required
string format: uuid
isSuperadmin
required
boolean
organizationId
required
string format: uuid
phone
required
string
role
required
string
smsConsentAt
required
string format: date-time
vendorId
required
string format: uuid
Example
{ "tokenType": "Bearer", "user": { "role": "admin" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}