API Authorization

« Back to documentation home

Overview

Traffic Parrot offers ready-made API mocks and sandbox environments including for the various APIs offered by FedEx®, including API Authorization from the FedEx® Developer Portal API Catalog.

Operation Description
POST /oauth/token Used to obtain an OAuth 2.0 bearer token to authorize with other FedEx® APIs

POST /oauth/token

The official API documentation can be found here: API Authorization

Features

  • Unique access token valid for 1 hour

Usage Example

Example HTTP request to Traffic Parrot sandbox:

Request method:	POST
Request URI:	http://localhost:8081/oauth/token
Form params:    grant_type=client_credentials
                client_id=l8a15a9564476045798a17887faec0928a
                client_secret=c32327a82e0441ac8199ed1b965454de
Headers:        Accept=*/*
                Content-Type=application/x-www-form-urlencoded; charset=utf-8

Example HTTP response from Traffic Parrot sandbox:

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Body:{
    "access_token": "f909a8ca-1c0c-4d83-8403-cfe796b113a4",
    "token_type": "bearer",
    "expires_in": 3600,
    "scope": "CXS-TP"
}

To use the access token with other APIs, the following HTTP header should be set:

authorization=Bearer ${access_token}