How to Test ADP APIs in Postman Since I am in an implementation role, not a developer role, I won’t be able to assist with API testing in your development environment of choice. For me to assist you, testing will need to take place in a standard environment first. That standard is Postman. Once all components (certificate, Client ID, Client Secret, all APIs you plan to use) have been tested in Postman you can move to your development environment to begin your project. Please note that the Postman application and web site are not owned or operated by ADP. Our support will be limited to only the most common questions and issues that we’ve already experienced. For anything that goes beyond our previous experience, such as severe system errors, we will need to refer you to the support options offered on the Postman web site. Before you begin, please ensure the following: · You have received your OAuth2 Client ID and Client Secret from ADP. (We cannot provide you with the ID and Secret until we have received your CSR file and Scopes selection.) · You have the .KEY and .PEM files from the certificate creation process. · You have downloaded and installed Postman (https://www.getpostman.com/downloads/) Step 1: Set up Client Certificates Follow steps a) through h), below, using these two Host name values, one at a time, in Step c): accounts.adp.com api.adp.com a) Go to: File > Settings > Certificates b) Click the Add Certificate link seen on the right. c) Add one of the host names to the Host field. (Do not include a protocol or a port.) d) For the CRT file field point to your .PEM file. e) For the KEY file field point to your .KEY file. f) Leave the PFX file and Passphrase fields empty. g) Click the Add button h) Repeat bullets b) through g) for the next Host value. If you ordered a UAT test environment you’ll need to repeat steps b) through h) using these two Host name values, one at a time, in Step c): uat-accounts.adp.com uat-api.adp.com Please continue to the next page for an example of what your Certificates set up should look like ...
Your Certificates set up should look something like the image below. Postman is updated quite frequently, so your version might look a bit different, but the Host and file pointers are the same. Step 2: Import the ADP test collection The ADP API test collection for Postman is attached to the same Welcome email as this document. The file name is: ”98. PostmanTestCollection.json” Utilize the Import button found on the left side of the Postman tool bar to import this collection.
Step 3: Encode Your Client ID and Client Secret This step requires the Client ID and Client Secret sent to you by ADP. Again, we cannot provide you with your ID and Secret until we have received your CSR file and Scopes selection. Once you receive your ID and Secret you’ll need them to create a base 64-encoded string, which will be used to request a bearer token. You can use this online base 64 encoding tool to create the string. Please note that this suggested web site is not owned or operated by ADP. If this web site is down or not functioning properly we will not be able to assist you. Please find a similar web site to encode your credentials. There are many of them out there. This just happens to be the one we use ourselves. Prior to using the encoding tool on this web site you’ll need to concatenate your ID and Secret. The ID and Secret need to be separated by a colon (:). Example: myclientid:myclientsecret Follow the Steps in the image below to 1) paste your ID/Secret concatenation into the top box, 2) click the ENCODE button and 3) copy the resulting string to the clipboard.
Step 4: Request a Bearer Token Go to the \"Token Request\" tab in the test collection. Click on the Headers tab. Paste the encoded string from Step 3 into the Authorization key VALUE where you see the words: “YOUR_BASE_64_ENCODED_CLIENT_ID_AND_CLIENT_SECRET” Be sure to leave a space in between the word “Basic “ and your string. Click the Send button. If this call fails, please follow the instructions on Page 5 of this doc: “If you need my assistance with an issue in Postman” If the call is successful, copy to the clipboard the value of the access_token (without the quotation marks). Please note that each token expires after one hour (3600 seconds), so you’ll need to repeat this call to acquire a new token after that amount of time has elapsed. Step 5: Run the workers call Go to the \"HR > Worker (List)\" tab in the test collection. Click on the Headers tab. Paste the access_token value from Step 4 into the Authorization key VALUE where you see the words: “COPY_YOUR_BEARER_TOKEN_HERE” Be sure to leave a space in between the word “Bearer “ and your string. Click the Send button. If this call fails, please follow the instructions on Page 5 of this doc: “If you need my assistance with an issue in Postman” If the call is successful, we know all components are operating properly! Step 6: Test all the APIs you plan to use for your project Remain in Postman and test any other API that you plan on using for your project. We want to catch any errors in Postman before you move to your development environment. Please note that many APIs require additional headers, so please pay careful attention to the documentation for each new API your test. If any of these additional APIs fail, please follow the instructions on Page 5 of this doc: “If you need my assistance with an issue in Postman” Step 7: Move to your development environment Congratulations! Now that any potential bugs have been worked out, you’re ready to move to your development environment and begin your project!
If you need my assistance with an issue in Postman: As developers, I’m sure you would agree that if you need to support a technical issue, nothing beats a good screen shot! We’re no different. We need to lay our eyes on the issue so we can more efficiently assist you and provide the best resolution. Please send us an email with two screen shots from Postman: #1: Your Certificates set up, like the screen shot you see on Page 2 of this document. #2: A full screen shot of your Postman call. Before taking this screen shot, please click on the Headers tab so the headers are exposed in the shot. Please ensure screen shot #2 clearly shows the following: o The URI you’re using (we need to ensure it’s formed properly) o The headers you have set up (we need to ensure all required headers are present and formed properly) o The Status code you received from the call o Any error message produced If you believe it is necessary, please attach text files that contain the response and/or request body. Send us any other info you believe we should know or you believe would be helpful. Also ... very important ... as we service multiple accounts at the same time, we need to know which account is writing to us. Please ensure your Subject line includes all of your identifying information in the format: NNNN | CCC | Co Name Where: NNNN = your 4-digit ADP region code CCC = your 3-character ADP company code Co Name = your company name This identification string can be found on the Subject line of the Welcome email you received at the start of this project. To make things easy you can just Reply to that Welcome email and include all of the items listed above. By providing all of this info, you’ll be helping us to help you. Thank you in advance!
Search
Read the Text Version
- 1 - 5
Pages: