--- title: "Authenticating to Use the Query Service API" slug: "authenticating-to-use-the-query-service-api-1" tags: ["WXP Collaboration", "API Authentication"] updated: 2026-04-09T00:09:36Z published: 2026-04-09T00:09:36Z canonical: "learn.workforceexperience.hp.com/authenticating-to-use-the-query-service-api-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.workforceexperience.hp.com/llms.txt > Use this file to discover all available pages before exploring further. # Authenticating to Use the Query Service API The credentials used to authenticate against the Assurance API are the same as your normal WXP Collaboration user credentials. ## Obtaining Authorization: The API authentication is performed via OpenID, with the credentials being sent as an application/x-www-form-url-encoded payload to a POST request to [https://login.wxpcollaboration.hp.com/auth/login](https://login.wxpcollaboration.hp.com/auth/login). The **Content-Type** header must be set, and a header with the key of **Host** must also be set - this header takes a value of **login.wxpcollaboration.hp.com**. ![image.png](https://cdn.us.document360.io/c9ecd56a-08d4-4e2f-ab71-60540f7ba8f3/Images/Documentation/image%28476%29.png?sv=2026-02-06&spr=https&st=2026-11-17T21%3A47%3A47Z&se=2026-11-17T22%3A47%3A47Z&sr=b&sp=r&sig=BETqyHtJ4PFp%2BaPBFgdx7ra7sqk8P0JgwlyCFv9PIo4%3D) The encoded payload contains the following key-value pairs: - grant_type, which takes the value password - client_id, with value WXP Collaboration - username, which is the WXP Collaboration username - password - the WXP Collaboration password ![image.png](https://cdn.us.document360.io/c9ecd56a-08d4-4e2f-ab71-60540f7ba8f3/Images/Documentation/image%28477%29.png?sv=2026-02-06&spr=https&st=2026-11-17T21%3A47%3A47Z&se=2026-11-17T22%3A47%3A47Z&sr=b&sp=r&sig=5I%2FMj%2FTEcWE7hDE7hqDBFsDSkn0bljkObe3ZzVrAI1c%3D) Upon successful authentication, a 200 response will be received with a JSON payload with the following schema: ``` { "access_token": string, "expires_in": int, "refresh_expires_in": int, "refresh_token": string, "token_type": string, "not_before_policy: long, "session_state": string, "scope": string } ``` | Field | Description | | --- | --- | | access_token | The token (beginning "eyJh") that can be used to access the API | | expires_in | The period of time, in seconds, for which this token is valid (300) | | refresh_expires_in | The period of valid time for the refresh_token. NOT IMPLEMENTED | | refresh_token | A token to refresh the authentication. NOT IMPLEMENTED | | token_type | The authentication token type. Will have the value of "bearer" | | not_before_policy | The start of signing key validity for the access_token | | session_state | Session information | | scope | The basis upon which the token was authenticated. Will have the value of "email profile" | An example response (abbreviated) can be seen here: ``` { "access_token":"eyJhb ... -Pdl31W5g", "expires_in":300, "refresh_expires_in":1800, "refresh_token":"ey J...-H5oAwI8", "token_type":"bearer", "not-before-policy":1533920635, "session_state":"dad914da-2d68-4202-a98a-146da4033e1e", "scope":"emailprofile" } ``` ## Using the Access Token: To use the token, add an HTTP header with key **Authorization** and a value comprised of the word **Bearer**, a single space, and then the token. ![image.png](https://cdn.us.document360.io/c9ecd56a-08d4-4e2f-ab71-60540f7ba8f3/Images/Documentation/image%28478%29.png?sv=2026-02-06&spr=https&st=2026-11-17T21%3A47%3A47Z&se=2026-11-17T22%3A47%3A47Z&sr=b&sp=r&sig=%2FOMNZe6TG5HaLKP7zJphTxB1H%2FUqJvD0HoW2G5c%2F5Wc%3D) It is worth noting that it is the developer's responsibility to ensure that the token is within its period of validity. **Contact Us** For any assistance, email us at [support@wxp.hp.com](mailto:support@wxp.hp.com). For FedRAMP-specific support, email us at [fedramp-support@wxp.hp.com](mailto:fedramp-support@wxp.hp.com)