getUnlimited 接口报错?
接口文档链接:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html API:https://api.weixin.qq.com/wxa/getwxacodeunlimit 请求参数URL https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=57_71OSSigphNslo3nd9f__C0VzWknh3_AravPlT0gi9rsKMcHYgxBxg3mmjv6jccQW_I3mxrIgbPoWiPPOLdytQcvssXDCUVowQeK3_s2RURZe6FTH577mP4FnJbSTlQlHgbmEphDB61P8OksiVPFdADABVL 请求BODY { "is_hyaline" : 1, "scene" : "inviteCode=123456", "env_version" : "trial", "width" : 280 } 响应体:{ "errcode": 47001, "errmsg": "data format error rid: 62a86863-159cc06e-424869ef" } 我是用objective-c 语言。通过这个接口 生成小程序二维码图 请求体查了没有错误 。 这个请求体要用是什么格式的? 我的请求的: - (void)reqQrCodeParamters:(NSDictionary*) paramters { NSString *urlString =@"https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=57_71OSSigphNslo3nd9f__C0VzWknh3_AravPlT0gi9rsKMcHYgxBxg3mmjv6jccQW_I3mxrIgbPoWiPPOLdytQcvssXDCUVowQeK3_s2RURZe6FTH577mP4FnJbSTlQlHgbmEphDB61P8OksiVPFdADABVL" NSURL *url = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; [request setHTTPMethod:@"POST"]; if (paramters) { [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type”]; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:paramters options:NSJSONWritingPrettyPrinted error:&error]; NSString * query = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; request.HTTPBody = [query dataUsingEncoding:NSUTF8StringEncoding]; } [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) { }]; }