I don`t know where is the identity token on paypal sandbox. is the identity token same like api number ?
With new look, i managed to access it by going to this link:
https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-website-payments
and seller preferences is located here:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_profile-display-handler&tab_id=SELLER_PREFERENCES
PayPal has some troubles with generating PDT tokens in sandbox.
For now you need to post your request in the following thread, providing your sandbox merchant id:
https://www.paypal-community.com/t5/Sandbox-Environment/PDT-Token-in-Sandbox/td-p/1617493
PayPal has updated their UI a bit. To save you some time filtering through the clutter here is the current location to generate an identity token.
Profile > My selling tools > Locate 'Website preferences' then click Update
Visit the Profile via www.sandbox.paypal.com, then go to https://www.sandbox.paypal.com/businessmanage/preferences/website, turn on "auto return" and "payment data transfer" and then the identity token will appear under "Payment data transfer".
If it does not display PDT token then try to purge cookies related to *.paypal.com and try the same process again. I solved this issue by following this. I found this from comment for this answer.