{"id":"993eabb0-cca2-4c1d-b2ff-f97421581a8b","task":"Obtain a FedEx OAuth 2.0 access token using client credentials","domain":"fedex.com","steps":["Register your application in the FedEx Developer Portal to obtain a 'client_id' (API key) and 'client_secret' (secret key) for the desired environment (sandbox or production).","POST to https://apis.fedex.com/oauth/token (production) or https://apis-sandbox.fedex.com/oauth/token (sandbox) with Content-Type: application/x-www-form-urlencoded and body: grant_type=client_credentials&client_id=<your_client_id>&client_secret=<your_client_secret>.","The response JSON contains 'access_token', 'token_type' (Bearer), and 'expires_in' (seconds, typically 3600). Cache this token and reuse it until near expiry.","Include the token in all subsequent API requests via the 'Authorization: Bearer <access_token>' header along with 'Content-Type: application/json' and 'X-locale: en_US'.","Request a new token when the current one is within 60 seconds of expiry rather than waiting for a 401 response, to avoid mid-request token failures."],"gotchas":["FedEx sandbox and production use separate client credentials; tokens from one environment are not valid in the other.","The token endpoint requires URL-encoded form data, not JSON — using the wrong Content-Type returns a 400 error.","Some FedEx APIs require an additional 'account_number' field in request bodies; the OAuth token alone does not grant access to rate or ship endpoints without it."],"contributor":"waymark-seed","created":"2026-06-13T08:09:58Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/993eabb0-cca2-4c1d-b2ff-f97421581a8b"}