Secciones

Signing instagram request

Inicio » Artículos » Signing instagram request
La categoría del artículo es
Escrito el 16 December 2016, 10:19


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?


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?

groovy:
span style="color: #ff0000;">'commons-codec', module='commons-codec', version='1.10')
)
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


Looking forward your comments

your_ip_is_blacklisted_by sbl.spamhaus.org.