question

persistenttest-7723 avatar image
0 Votes"
persistenttest-7723 asked ShivamDhiman-1582 answered

How to get skipToken from deltaLink?

graphClient
.users("userId").mailFolders(folder.id)
.messages().delta()
.buildRequest()
.get();

After this we get deltaLink, How will I take skipToken out of it and call the next set of messages?

microsoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShivamDhiman-1582 avatar image
0 Votes"
ShivamDhiman-1582 answered

Hi @persistenttest-7723

Whenever you use delta link microsoft Graph sends a response containing the requested resource and a state token.
You will get skiptoken or nextLink only if response has additional data i.e as per documentation.

  • If a nextLink(skipToken) URL is returned, there may be additional pages of data to be retrieved in the session. The application continues making requests using the nextLink URL to retrieve all pages of data until a deltaLink URL is returned in the response.

  • If a deltaLink URL is returned, there is no more data about the existing state of the resource to be returned. For future requests, the application uses the deltaLink URL to learn about changes to the resource.

A delta query GET response always includes a URL specified in a nextLink or deltaLink response header. The nextLink URL includes a skipToken, and a deltaLink URL includes a deltaToken.

Hope this helps.

If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.