# How to get Instagram Profile Picture

**URL:** https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745
**Category:** Ask for Help
**Created:** [September 13, 2020, 11:20pm UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745 "2020-09-13T23:20:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Vitor\_Rosas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vitor_rosas/32/2457_2.png) [@Vitor\_Rosas](https://community.glideapps.com/u/Vitor_Rosas)
#### Post date: [September 13, 2020, 11:20pm UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/1 "2020-09-13T23:20:12Z")

</div>

Hi Folks!

I have around 600 stores registered at my app and I’d like to replace their profile picture with their own profile picture from Instagram profiles. Almost all of them have an IG profile, so it will help me to replace the image for about 90% of stores. The question is… How to get it from IG?

Did some of you already faced this challenge ?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Stellasphere](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stellasphere/32/7862_2.png) [@Stellasphere](https://community.glideapps.com/u/Stellasphere)
#### Post date: [September 13, 2020, 11:52pm UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/2 "2020-09-13T23:52:00Z")

</div>

Hello Vitor!

Instagram outputs information about accounts in JSON format when you request it via their web API.

[https://www.instagram.com/USERNAMEHERE/?\_\_a=1](https://www.instagram.com/USERNAMEHERE/?__a=1)

Under “profile\_pic\_url” or “profile\_pic\_url\_hd”, there will be a link to the profile picture.  
There might be easier ways to do this, but I have found that this is the easiest (and free) way to do it.

[Made a demo sheet that uses ImportJSON (a addon)](https://docs.google.com/spreadsheets/d/1XWKdNYGNDI1A2yc7wA5vIOXpXeGezcbXC1E8Dc2dRXI/edit#gid=0)

---

<div class="post-metadata">

### Author: ![Vitor\_Rosas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vitor_rosas/32/2457_2.png) [@Vitor\_Rosas](https://community.glideapps.com/u/Vitor_Rosas)
#### Post date: [September 14, 2020, 10:05am UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/3 "2020-09-14T10:05:14Z")

</div>

Wow!! Really cool! Thanks so much!

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 14, 2020, 10:20am UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/4 "2020-09-14T10:20:14Z")

</div>

An alternative way here.

> [@Is there a way to 'follow' someones twitter from in the app](https://community.glideapps.com/t/is-there-a-way-to-follow-someones-twitter-from-in-the-app/10655/21):
>
> So I’m reporting back with what I can find now. Glide https://sea2.discourse-cdn.com/flex020/user\_avatar/community.glideapps.com/[user\_name]/360/49\_2.png Best I can find is 360x360 images. Instagram =IMPORTXML("https://www.instadp.com/fullsize/"&[user\_name],"//a[@class='download-btn']/@href") However this is unstable, sometimes I can import it, sometimes not. Facebook You have to get the user ID (numerical) to get the photo, and it seems many people are using their customized user name in…

---

<div class="post-metadata">

### Author: ![Purvang\_Joshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/purvang_joshi/32/12645_2.png) [@Purvang\_Joshi](https://community.glideapps.com/u/Purvang_Joshi)
#### Post date: [September 14, 2020, 11:01am UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/5 "2020-09-14T11:01:42Z")

</div>

Apart from Instagram, this can help you.

[https://s.gravatar.com/avatar/{email\_id}?s=1000](https://s.gravatar.com/avatar/%7Bemail_id%7D?s=1000)

[https://graph.facebook.com/{user.id}/picture?width=400&height=400](https://graph.facebook.com/%7Buser.id%7D/picture?width=400&height=400)

> **[Avatar API.com - Put a name and face to that email address](https://www.avatarapi.com/)**

---

<div class="post-metadata">

### Author: ![Purvang\_Joshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/purvang_joshi/32/12645_2.png) [@Purvang\_Joshi](https://community.glideapps.com/u/Purvang_Joshi)
#### Post date: [September 14, 2020, 11:18am UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/6 "2020-09-14T11:18:27Z")

</div>

For a gravatar image, you need to put hash value.

I’ve used this method to get 1000 attendees for a developer conference check-in app a year ago.

So, in a google sheet use the apps script code to get the md5 value of email id.

Here is a code

function MD5 (input) {  
var rawHash = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, input);  
var txtHash = ‘’;  
for (i = 0; i \< rawHash.length; i++) {  
var hashVal = rawHash[i];  
if (hashVal \< 0) {  
hashVal += 256;  
}  
if (hashVal.toString(16).length == 1) {  
txtHash += ‘0’;  
}  
txtHash += hashVal.toString(16);  
}  
return txtHash;  
}

Now, Get back to sheets. And use function =md5(email column value)

then simply use url [https://s.gravatar.com/avatar/{email\_id\_md5}?s=1000](https://s.gravatar.com/avatar/%7Bemail_id%7D?s=1000)

---

<div class="post-metadata">

### Author: ![Vitor\_Rosas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vitor_rosas/32/2457_2.png) [@Vitor\_Rosas](https://community.glideapps.com/u/Vitor_Rosas)
#### Post date: [September 14, 2020, 12:29pm UTC](https://community.glideapps.com/t/how-to-get-instagram-profile-picture/15745/7 "2020-09-14T12:29:31Z")

</div>

Fantastic! Thanks so much!
