Annulé

Post method of Alamofire request response is “token_not_provided” Swift

I get response with token and post this token with Alamofire on response of the request. I test that token is received and sent, also I tried to send random number as token and received same error on resposen - "token_not_provided".

API does not require header or token into header.

Request code is below:

[login to view URL](userRegURL, method: .post, parameters: parameters, encoding: [login to view URL]).responseJSON

{

response in

if let result = [login to view URL] {

let jsonData = result as! NSDictionary

tokenFromAPI = [login to view URL](forKey: "token") as! String

let phoneParameters: Parameters = [

"token" : tokenFromAPI,

"phone" : [login to view URL]!

]

let sendCodeURL = "https://aabbcc/member/send-code"

[login to view URL](sendCodeURL, method: .post, parameters: phoneParameters).responseJSON

{

response in

if let result = [login to view URL] {

let jsonData2 = result as! NSDictionary

print(phoneParameters)

print(jsonData2)

}

}

}

}

API documentation is shown below

Please make bids if you really know the problem with the code.

Compétences : JSON, Mobile App Development, Swift

en voir plus : post method implemented mod security, post method html document, post form xml parse response, post 200 300 word response following hired, added post method uip, inet control post method, send xml request response php, food order asp post method, javascript post method, software catch post method, added post method, html post method, yahoo store add cart using post method, post 350 500 word response following ability choose, php post request response xml, iphone project sample post xml request response, post method send xml data webpage response, does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

Concernant l'employeur :
( 4 commentaires ) BAKU, Azerbaijan

Nº du projet : #18067591