Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

538
Views
Get hash from image url using /adimages Marketing api

Based on the documentation we can upload image file from our system(which are present locally). https://developers.facebook.com/docs/marketing-api/reference/ad-image

How to upload an image from an url to /adimages endpoint and get image-hash id?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Facebook does not allow direct URL access. But there is a workaround. You can post the image content in bytes format using the bytes option as described in the documentation.

Below is a curl command which worked for me :

curl -F 'bytes=iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAOVBMVEX///87WZg7WZg7WZg7WZg7WZg7WZg7WZg7WZg7WZg7WZhMeMJEaa5Xi9tKdb0+Xp5Wi9tXjNxThNH+wk/7AAAACnRSTlMAsHIoaM7g/fx9Zr/g5QAAAGlJREFUeNplkFsOwCAIBPGJrtbX/Q/bqm1qwnxuJrBAE6OVD15pQy/WYePsDiIjp9FGyuC4DK7l6pOrVH4s41D6R4EzpJGXsa0MTQqp/yQo8hhHMuApoB1JQ5COnCN3yT6ys7xL3i7/cwMYsAveYa+MxAAAAABJRU5ErkJggg==' -F 'access_token=#ACCESS_TOKEN#' "https://graph.facebook.com/v13.0/#ACT_ID#/adimages"

To convert the image in bytes format you can use any language. Below is an example using PHP :

$bytes = base64_encode( file_get_contents( 'https://example.com/PATH/TO/image.jpg' ) );
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!