If you don't find an answer, please click here to post your question.
Reply
Occasional Advisor
Posts: 9
Registered: ‎01-03-2018

Invalid signature iOS.

Hi,

 

I have a problem with Backlot v2 API, I make a request to retrieve videos by labels, the first time that I make the request all is ok, but if I make the request again, I obtain Invalid signature error. What could be the problem?

 

Thanks in advance

Ooyalan
Posts: 11
Registered: ‎11-05-2017

Re: Invalid signature iOS.

Hello,
My name is Dmytro and I am part of the Ooyala Technical Support team. I will gladly assist you with this issue.
 
First of all, I would like to clarify if the api request is made from the iOS app. Is it correct?
If so, could you please try the sample solution from the link below?
Please try this sample and inform me about the result.
 
---
Regards,
Dmytro Didenko
Ooyala Technical Support Engineer
Highlighted
Occasional Advisor
Posts: 9
Registered: ‎01-03-2018

Re: Invalid signature iOS.

[ Edited ]

Yes, I make the request from iOS App. I use that code but I need to update to last version of iOS because It has deprecated code. 

I made some tests and I think that the problem could be with expires date but I'm not sure.

Ooyalan
Posts: 11
Registered: ‎11-05-2017

Re: Invalid signature iOS.

Hello,

 
Thank you for the reply.
 
Yes, it is quite possible that the issue could be caused by the expires value.
 
You mentioned that the request at first time is successful and the next time it fails. I assume that at the first time "expires” values in the url and in the signature generation subroutine are matched. Then, on second attempt one of the mentioned values changes, while another remains the same.
 
Could you please check that behaviour.
 
Additionally, here is the link to the general algorithm for signing requests for your convenience.
 
Occasional Advisor
Posts: 9
Registered: ‎01-03-2018

Re: Invalid signature iOS.

Yes I follow this website to do my development. I don´t understand one thing: The expires have to be the same when I do the same request? I have another problem.. When I exec a request that don´t retrieve any data, the next requests fails :( but If the requests retrieve data, all works fine..

Ooyalan
Posts: 11
Registered: ‎11-05-2017

Re: Invalid signature iOS.

Hello,
 
> The expires have to be the same when I do the same request?
 
The expires value should be the same in actual requested url and in the input value which takes part in the signature generation process.
 
>  I have another problem
 
Thus the issue with “Invalid signature error” is observed only when the second request is made to the same url which doesn’t have the data in the response. Is it correct?
 
I can check both first(successful) and second(failed) requests coming to our endpoints in the log files. Please make the test one more time and provide me with the following information:
 
  1. Your backlot account(you can send me this information in private message)
  2. The exact time the requests are made(with timezone)
  3. The actual requests
 Thank you.
Ooyalan
Posts: 11
Registered: ‎11-05-2017

Re: Invalid signature iOS.


Hello,
 
Thank you for the provided information in private message.
I’ve checked the logs and found the root of the issue.
 
Here is the example of the unsuccessful call(I’ve omitted the api key for security purposes):
/v2/labels/4de7a6fa5c414a66ae7a48d9aa83b531/assets?api_key=<your_api_key>&expires=1516096123&signature=mmxBPPqK7WDrReSriC9Ar4phuLKV0kz+LSdq5IHpFi0
 
Please take a look at the signature. It contains “+” sign and this violates the 8 rule from the following documentation:
“+” sign should be converted to “%2B”
 
In order to fix this issue please check your part of the code where the final url encoding is invoked and ensure that the “+” sign is converted to “%2B”.
 
Please inform me about the results. Thank you.
 
---
Regards,
Dmytro Didenko
Ooyala Technical Support Engineer
Advisor
Posts: 15
Registered: ‎08-10-2018

Re: Invalid signature iOS.

it was working smooth on my iPad Pro when it was running on ios 10 however as I have updated to ios 11.3 whenever now I am opening the app it only loads a blank screen on the start up and crashes after a while automatically. How do I fix it?