You have a wrong authrozation when you get the code. Use step by step to check what you get and send to api.