Please check that the encoded app key/secret value you pass as "Basic" authorization in the "Authorization" header are properly encoded. Based on the error, it sounds like your value isn't properly encoded. Please refer to the "App Authentication" documentation for information on how to format this.