LogoLogo
  • Introduction
  • OVERVIEW
    • About ParqEx
      • -- Marketplace
      • -- Access+
      • -- GuestParq & GuestAccess
      • -- Enforcer
    • API Requirements
    • Roles and Permissions
  • GETTING STARTED
    • Requesting an Account
    • Using RESTful Tools
    • Webhooks
  • Embedding ParqEx in Native Mobile Apps
    • Overview
    • FAQ
    • Technical Documentation
      • iOS Implementation Guide
      • Android Implementation Guide
  • THE BASICS
    • Entities
    • Best Practices
    • Testing Accounts
  • OAUTH
    • Overview
    • How to Authorize Access
      • Step 1: Generate Authorization URL
      • Step 2: Handle Authorization Response
      • Step 3: Request an Access Token
      • Step 4: Call API Endpoints
      • Step 5: Refresh the Tokens
  • API ENDPOINTS
    • Overview
    • Get User Info
    • Get User Settings
    • Get User Devices
    • Toggle Access Point
    • Invite User (internal)
    • Get Access History
Powered by GitBook
On this page

Was this helpful?

  1. OAUTH
  2. How to Authorize Access

Step 3: Request an Access Token

To make authenticated requests on behalf of the user, the authorization_code must be exchanged for an access token. To request an access token, your application should send the this request.

Store both the access_token and the refresh_token. The access token can be used immediately to make authenticated requests but it expires after the expires_in seconds. The refresh token can be used to refresh both tokens.

Note: Be sure to set the Content-Type header field of your request to:

Content-Type: application/x-www-form-urlencoded

A valid request should follow this format (line breaks added for clarity):

GET https://api.parqex.com/oauth/v2/endpoints/token/?
    client_id=<CLIENT_ID>&
    client_secret=<CLIENT_SECRET>&
    grant_type=authorization_code&
    code=<AUTHORIZATION_CODE>&
    redirect_uri=<ENCODED_REDIRECT_URL>

PreviousStep 2: Handle Authorization ResponseNextStep 4: Call API Endpoints

Last updated 4 years ago

Was this helpful?