API Authorization

To connect to BidSwitch using the API, use the following steps.

  • Create an API user in your myBidSwitch UI account.
  • Using this user’s credentials, get your API token by making a POST request to the BidSwitch authorization endpoint.
  • Pass this token in your request header Authorization:Bearer ${TOKEN}

Creating an API User

To create a user profile that can receive API Tokens, use the following steps:

  1. From the BidSwitch UI, select Users ‣ Add User.
  2. From the User Role dropdown menu, select API Account.

Getting an API Auth Token

To get your API token, make a HTTP POST request to the following URL. The response will contain your access token.

https://uauth.iponweb.com/oauth2/token/

The POST request must contain the following fields

grant_type=password
scope=service_id=api.bidswitch.com
username=<USERNAME> <!-- Your BidSwitch UI login -->
password=<PASSWORD> <!-- Your Bidswitch UI password -->

Authorization Response

{
  "token_type": "Bearer",
  "scope": "service_id=api.bidswitch.com",
  "access_token": "<your token>",
  "expires_in": 3600
}

Equivalent request via curl command:

$ curl https://uauth.iponweb.com/oauth2/token/ \
  --request POST \
  --data "grant_type=password" \
  --data "username=<username>" \
  --data "password=<password>" \
  --data "scope=service_id=api.bidswitch.com"