legacy-api-documentation icon indicating copy to clipboard operation
legacy-api-documentation copied to clipboard

Upload returns 404 response

Open abubberman opened this issue 9 years ago • 2 comments

Hi,

I'm trying to upload an image using the Upload API.. But I'm getting a 404 not found exception. Can anyone tell me what is wrong with my code??

using (var httpClient = httpClientHelperFactory.Create()) (wrapper for HttpClient) { var content = new MultipartFormDataContent { { new StringContent(photoId.ToString()), "photo_id"}, { new StringContent(uploadKey), "upload_key"}, { new ByteArrayContent(file),"file", fileName}, { new StringContent(consumerKey), "consumer_key"}, { new StringContent(token), "access_key"} }; var response = await httpClient.PostAsync( " http://upload.500px.com/v1/upload", content, cancellationToken).ConfigureAwait(false); }

abubberman avatar May 17 '16 07:05 abubberman

Hi,

thanks for getting in touch!

Please refer to our documentation on uploads and make sure you're passing everything correctly: https://github.com/500px/api-documentation/blob/master/endpoints/upload/POST_upload.md

and let us know if that works!

Cheers, Martin

mck182 avatar May 17 '16 18:05 mck182

Hi,

thanks for the response. Using this endpoint, I'm receiving a 401 not Authorized exception. The documentation says its a beta endpoint. Could this be the reason for the 401 error?

Thanks, Arie

abubberman avatar May 18 '16 07:05 abubberman