I am able to successfully make non-authenticated and protected calls to the Netflix API. I am having a little trouble making signed requests to the catalog, however.
Using the OAuth Test page, it is clear to me that my Base String is correct. My request URL is also correct, except for the oauth_signature. The oauth_signature is the only thing that differs.
If I understand correctly, the only difference between a protected call and a signed call is that there are no tokens involved, and that I am appending on call parameters (such as term).
So, I am using the exact same code that I use for my protected calls that I am for my signed calls, except my signature key ONLY contains my shared secret (with an ampersand sign on the end of it). It does not use the access token.
Am I missing something here? Where else can I be going wrong?
Yes, you need to make sure that you're following the OAuth character encoding guidelines (which specify UPPERCASE hexidecimal in the SBS as well as encoding a number of specific normally URI allowed characters).
Honestly, if you can, I'd REALLY encourage you to use one of the many OAuth libraries that are out there. Most of these have already hit all the issues and resolved them.
Hello,
I am able to successfully make non-authenticated and protected calls to the Netflix API. I am having a little trouble making signed requests to the catalog, however.
Using the OAuth Test page, it is clear to me that my Base String is correct. My request URL is also correct, except for the oauth_signature. The oauth_signature is the only thing that differs.
If I understand correctly, the only difference between a protected call and a signed call is that there are no tokens involved, and that I am appending on call parameters (such as term).
So, I am using the exact same code that I use for my protected calls that I am for my signed calls, except my signature key ONLY contains my shared secret (with an ampersand sign on the end of it). It does not use the access token.
Am I missing something here? Where else can I be going wrong?
Thanks!
Message edited by Kevin 2 years ago
Tags
Kevin – 2 years ago
Solved: The '+' symbol between search terms containing a space wasn't URL encoded.
JR Conlin – 2 years ago
Argh, sorry that I didn't respond earlier.
Yes, you need to make sure that you're following the OAuth character encoding guidelines (which specify UPPERCASE hexidecimal in the SBS as well as encoding a number of specific normally URI allowed characters).
Honestly, if you can, I'd REALLY encourage you to use one of the many OAuth libraries that are out there. Most of these have already hit all the issues and resolved them.