As Instagram API states in its docs, You can secure your API calls and mitigate impersonation attempts by making server-side calls and passing a per-request signature using your Client Secret, but how to do that in Java/Groovy?
)
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import org.apache.commons.codec.binary.Hex
"HmacSHA256""my-app-secret""HmacSHA256""https://api.instagram.com/media/657988443280050001_25025320?access_token=my-access-tokend&count=10""${url.path}|${url.query.replace('&','|')}""UTF-8")))
This script uses the library Apache Commons Codec