Skip to content

Connect and verify

Use this page to prove your connection to the Partner API works, or to find out why it doesn’t. If you are starting from nothing, do the Quickstart first.

  • An OAuth2 application of type Machine-to-machine, with its client_id and client_secret. Request the scope inventory.read for reads. See Applications.

  • An account (managing entity) your token can act for. The token acts as the user who created the application. That user must own the account, or be an accepted member of it, with the section grants your calls need: ACCOUNT:READ (to read the account itself, as in step 4 below), INVENTORY:READ, and BOOKING:READ or BOOKING:WRITE for booking calls. Pending invitations and deactivated members get nothing. Booking calls also require the account to be a travel agency.

  • The right hosts for your environment:

    Token endpointPartner API host
    Staginghttps://staging-iam.wink.travel/oauth2/tokenstaging-partner.wink.travel:443
    Productionhttps://iam.wink.travel/oauth2/tokenpartner.wink.travel:443

    Credentials do not carry over between the two.

Four facts that explain most first-day problems:

  • The host speaks only gRPC. A plain HTTP request, for example opening the host in a browser, returns 415 Content-Type is missing. That is the healthy response: the server is up.
  • Tokens last 3 hours. Cache a token and refresh it shortly before it expires.
  • IDs are full UUIDs in the 8-4-4-4-12 form. An ID missing a single character is reported as an account that doesn’t exist, which looks exactly like a permissions problem.
  • Reflection needs a token. Without one, list is rejected like any other call.

Install grpcurl and jq. The examples use staging; drop the staging- prefix from both hosts for production.

  1. Get a token. client_credentials with HTTP Basic client authentication:

    Terminal window
    export WINK_TOKEN=$(curl -s -X POST https://staging-iam.wink.travel/oauth2/token \
    -u "<YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>" \
    -d "grant_type=client_credentials" \
    -d "scope=inventory.read" | jq -r .access_token)

    The token endpoint also accepts client_id and client_secret in the form body, as in the Quickstart. Either style works.

    If this prints null, the token request failed. Run it without jq to read the error code, and see Quickstart, Step 3.

  2. List the services. This proves the host, the TLS connection and the token:

    Terminal window
    grpcurl -H "authorization: Bearer $WINK_TOKEN" staging-partner.wink.travel:443 list
  3. Discover your accounts. Send no managing-entity-id header. The response lists every account your token can act for:

    Terminal window
    grpcurl -H "authorization: Bearer $WINK_TOKEN" -d '{}' \
    staging-partner.wink.travel:443 wink.partner.v1.Accounts/ListAccounts
    export WINK_ACCOUNT_ID='<accountId from the list>'

    Copy the ID from this list instead of typing it. An empty list means the token’s user has no accepted membership on any account.

  4. Read one account. Name the account in both the header and the request:

    Terminal window
    grpcurl -H "authorization: Bearer $WINK_TOKEN" \
    -H "managing-entity-id: $WINK_ACCOUNT_ID" \
    -d "{\"account_id\": \"$WINK_ACCOUNT_ID\"}" \
    staging-partner.wink.travel:443 wink.partner.v1.Accounts/GetAccount
  5. Make one real call. This proves the permission guard passes for the section you will use. For example, search a city. The check-in date must be in the future, so change startDate to one that is (see Quickstart, Step 5):

    Terminal window
    grpcurl -H "authorization: Bearer $WINK_TOKEN" \
    -H "managing-entity-id: $WINK_ACCOUNT_ID" \
    -d '{"urlName": "bangkok-thailand", "userSession": {"itinerary": {"startDate": "2026-12-01", "nights": 2, "room": {"adults": 2}}, "currencyCode": "USD", "languageCode": "en"}}' \
    staging-partner.wink.travel:443 wink.partner.v1.Search/SearchByCity

If step 5 returns results, you are connected. Anything else is in the troubleshooting table.

The Partner API is gRPC, so use Postman’s gRPC request type, not a REST request. The REST walkthrough in Setup does not apply to it.

  1. Click New > gRPC. Enter staging-partner.wink.travel:443 and turn TLS on.

  2. Add your token first, because reflection needs it. Open the Authorization tab, choose Bearer Token and paste a token: run the token request from step 1 of the grpcurl section, then echo $WINK_TOKEN. Alternatively, choose OAuth 2.0, set Grant type to Client Credentials, Access token URL to https://staging-iam.wink.travel/oauth2/token, fill in your client ID and secret, set Scope to inventory.read, and click Get New Access Token.

  3. Choose the method. In the method selector, pick Use server reflection. Or choose Import a .proto file and import the files from wink-travel/partner-api-proto.

  4. Open the Metadata tab and add managing-entity-id with your account ID as the value. Leave it out for ListAccounts.

  5. Select wink.partner.v1.Accounts/ListAccounts and click Invoke. Then call an account-scoped method such as GetAccount or Search/SearchByCity.

gRPC reports errors as a status code, not as an HTTP status. In grpcurl the code and message are printed as ERROR: Code: ... Message: ....

SymptomWhat it meansWhat to do
UNAUTHENTICATED: Authentication failedThe token is missing, expired or invalid.Request a new token. Check that the token and the host belong to the same environment (staging or production).
PERMISSION_DENIED: Access deniedThe token is valid, but its user can’t act for the managing-entity-id you sent. Either the ID is wrong or truncated, the user isn’t an accepted member, a section grant is missing (for example ACCOUNT:READ for GetAccount), or a booking call was made from an account that isn’t a travel agency.Call ListAccounts and use an ID from that list. Then check the membership and section grants.
ListAccounts returns an empty listThe token’s user has no accepted membership on any account.Check that the invitation was accepted and the member is active, or use the application creator’s own account.
INVALID_ARGUMENTThe request body is wrong. The connection and permissions are fine.Fix the request. The message names the field.
415 Content-Type is missing on a plain HTTP requestNormal. The host only speaks gRPC.Use a gRPC client such as grpcurl or Postman.
An HTML 403 Forbidden page, or grpcurl reports Internal: server closed the stream without sending trailersThe request was blocked before it reached the API.Contact support with the time of the call.