Generate oauth_signature in upload api

media-upload

#1

Hello all,

I’m having difficulties while using twitter upload api (https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload)

This is the error i’m having
{“errors”:[{“code”:32,“message”:“Could not authenticate you.”}]}

Since the upload uses diferent method to generate oauth_signature (https://developer.twitter.com/en/docs/media/upload-media/uploading-media/media-best-practices.html)

I think that this error that i’m having is related to the construction of oauth_signature, therefore i’m posting this thread to get some help from the experts :slight_smile:

This is the code that i’m using, i think the error might come from line 81 but i don’t know what i’m doing wrong.

https://pastebin.com/xRUjYJKj

Thank you all in advance.