Share via

Rest Api for internal sharepoint

Schwartz Timothy J 1 Reputation point
2021-08-09T14:37:28.67+00:00

I've been trying to connect to our internal SharePoint 2016 using postman. I've generated an ID and Secret, but I am unable to generate an access token. When using the get http://share-internal.SITENAME.com/teams/TEAM/_vti_bin/client.svc/, instead of getting an authentication error like in the other examples online, I get some difficult to understand xml and the 200 OK. Is this an issue specific to internal sharepoint?

Microsoft 365 and Office | SharePoint Server | Development
Microsoft Partner Center API

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2021-08-10T05:50:55.307+00:00

    Hi @Schwartz Timothy J ,
    Since the way to access sharepoint 2016 is different from sharepoint online,take following steps:
    Step 1 – Get your SharePoint site’s FormDigest using Contextinfo call

    1. In Postman, the contextinfo endpoint URL for your SharePoint Site…something like: https://mySharePointSite/_api/contextinfo
    2. Set the Accept header: application/json;odata=verbose
    3. Set the html verb to POST
    4. Hit Send

    With Results:

    1. Copy the big string of characters inside the <d:FormDigestValue> ~~~ </d:FormDigestValue> tags

    Step 2 – Make your HTML GET Request (or POST if you’re posting)

    1. Enter your endpoint URL…something like: https://mySharePointSite/_api/web/lists/getbytitle(‘MyListName’)/items?$select=Title
    2. Set the Accept header: application/json;odata=verbose
    3. Set the HTML verb to GET (if you’re getting data. POST or PUT or whatever if you’re doing something else)
    4. Add the header X-RequestDigest and paste the FormDigestValue copied above into it
    5. Hit Send, and you should be good to go

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.