---
updatedAt: 2024-11-21T17:34:20.000Z
agentTools:
  projectIndex: https://developer.truckstop.com/llms.txt
---

# How To Refresh an Expired Access Token

```shell Shell
curl --request POST \
     --url 'https://api-int.truckstop.com/auth/token?scope=truckstop' \
     --header 'Authorization: basic MTIzOjQ1Ng==' \
     --header 'accept: application/json' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data grant_type=refresh_token
     --data refresh_token=1234
```

```json Response Example
{"success":true}
```

# Set up the request

{/* shell@2 */}

1Begin setting up the request using the stage base URL of: 

[https://api-int.truckstop.com](https://api-int.truckstop.com)

The endpoint should be set to:\
/auth/token

With a scope of Truckstop

# Set Authorization headers

{/* shell@3 */}

The Authorization header for this request will be:\
Basic base64-encoded-clientID:Secret

Ex:\
Client ID: 123\
Client Secret: 456

123:456 encoded to base64 is:\
MTIzOjQ1Ng==

# Set the body fields

{/* shell@5-7 */}

Note that the content-type header needs to be x-www-form-urlencoded and the data fields should be --data-urlencode

Set the Grant\_Type to: "refresh\_token"

Set the refresh\_token to your valid Refresh Token obtained with your original Access Token