как сейчас у меня это так:Как установить pass api ключ в NSURLRequest в iOS?
NSURLRequest *Request = [NSURLRequest requestWithURL:[NSURL URLWithString: reqURLStr]];
NSURLResponse *resp = nil;
NSError *error = nil;
NSData *response = [NSURLConnection sendSynchronousRequest: Request returningResponse: &resp error: &error];
NSString *responseString = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
return responseString;
и я называю это так:
NSString *stripeCustomerRequestURL = [NSString stringWithFormat:@"https://api.stripe.com/v1/customers/%@",stripeCustomerId];
// NSString for the return of the tax in decimal form
NSString *customerInformation = [self retrieveStripeCustomer:stripeCustomerRequestURL];
Я получаю эту ошибку, которую я знаю, что я должен передать ключ апи, но как может Я?
{
"error": {
"type": "invalid_request_error",
"message": "You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/."
}
}